feat(preferences): error reporting segment (#652)

* feat(preferences): error reporting segment

* feat(preferences): move error reporting to general pane
This commit is contained in:
Gorjan Petrovski
2021-09-28 18:08:27 +02:00
committed by GitHub
parent b312df41a6
commit 3867f625f1
8 changed files with 117 additions and 20 deletions

View File

@@ -7,18 +7,18 @@ const HorizontalLine: FunctionComponent<{ index: number; length: number }> = ({
}) => (index < length - 1 ? <HorizontalSeparator classes="my-4" /> : null);
export const PreferencesGroup: FunctionComponent = ({ children }) => (
<div className="bg-default border-1 border-solid rounded border-gray-300 px-6 py-6 flex flex-col">
<div className="bg-default border-1 border-solid rounded border-gray-300 px-6 py-6 flex flex-col mb-3">
{Array.isArray(children)
? children
.filter(
(child) => child != undefined && child !== '' && child !== false
)
.map((child, i, arr) => (
<>
{child}
<HorizontalLine index={i} length={arr.length} />
</>
))
.filter(
(child) => child != undefined && child !== '' && child !== false
)
.map((child, i, arr) => (
<>
{child}
<HorizontalLine index={i} length={arr.length} />
</>
))
: children}
</div>
);

View File

@@ -7,12 +7,6 @@ export const PreferencesPane: FunctionComponent = ({ children }) => (
{children != undefined && Array.isArray(children)
? children
.filter((child) => child != undefined)
.map((child) => (
<>
{child}
<div className="min-h-3" />
</>
))
: children}
</div>
</div>