Updating styling on parts and invoicing modals BOD-404

This commit is contained in:
Patrick Fic
2020-09-22 14:23:27 -07:00
parent 43490bbcba
commit 49f6cfa8c1
16 changed files with 431 additions and 333 deletions

View File

@@ -2,7 +2,12 @@ import React from "react";
import { Row, Col, Typography } from "antd";
import "./layout-form-row.styles.scss";
export default function LayoutFormRow({ header, children, grow = false }) {
export default function LayoutFormRow({
header,
children,
grow = false,
...restProps
}) {
if (!!!children.length) {
//We have only one element. It's going to get the whole thing.
return (
@@ -20,7 +25,7 @@ export default function LayoutFormRow({ header, children, grow = false }) {
if (spanOverride) return { span: spanOverride };
return {
xs: {
span: 24,
span: !grow ? 24 : Math.max(12, 24 / children.length),
},
sm: {
span: !grow ? 12 : Math.max(12, 24 / children.length),
@@ -38,7 +43,7 @@ export default function LayoutFormRow({ header, children, grow = false }) {
};
return (
<div className="imex-form-row">
<div className="imex-form-row" {...restProps}>
{header ? <Typography.Title level={4}>{header}</Typography.Title> : null}
<Row {...rowGutter}>
{children.map(