Cleanup Shop Config.

This commit is contained in:
Patrick Fic
2021-04-07 17:39:46 -07:00
parent bac671ff5c
commit 54e5129fd4
16 changed files with 2682 additions and 2585 deletions

View File

@@ -1,4 +1,4 @@
import { Col, Divider, Row, Typography } from "antd";
import { Col, Divider, Row } from "antd";
import React from "react";
import "./layout-form-row.styles.scss";
@@ -9,13 +9,26 @@ export default function LayoutFormRow({
noDivider = false,
...restProps
}) {
const DividerHeader = () =>
!noDivider && (
<Divider
orientation="left"
type="horizontal"
style={{ marginTop: ".8rem" }}
>
{header}
</Divider>
);
if (!!!children.length) {
//We have only one element. It's going to get the whole thing.
return (
<div className="imex-form-row">
{header ? (
<Typography.Title level={4}>{header}</Typography.Title>
) : null}
<div
className="imex-form-row"
{...restProps}
style={{ marginBottom: ".8rem", ...restProps.style }}
>
<DividerHeader />
{children}
</div>
);
@@ -44,12 +57,12 @@ export default function LayoutFormRow({
};
//{header ? <Typography.Title level={4}>{header}</Typography.Title> : null}
return (
<div className="imex-form-row" {...restProps}>
{!noDivider && (
<Divider orientation="left" type="horizontal">
{header}
</Divider>
)}
<div
className="imex-form-row"
{...restProps}
style={{ marginBottom: ".8rem", ...restProps.style }}
>
<DividerHeader />
<Row {...rowGutter}>
{children.map(
(c, idx) =>