Cleanup Shop Config.
This commit is contained in:
@@ -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) =>
|
||||
|
||||
Reference in New Issue
Block a user