Skip to content

Commit

Permalink
fix(atoms): move gap modifier to the form default props
Browse files Browse the repository at this point in the history
  • Loading branch information
ej9x committed Oct 9, 2018
1 parent f342e12 commit e76722e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/atoms/dataEntry/Form/FormPlate.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ function FormPlate({
>
<FlexLayout
{ ...rest }
gap="md"
alignItems="stretch"
>
{ children }
</FlexLayout>
Expand All @@ -60,6 +58,9 @@ FormPlate.defaultProps = {
...theme[name].defaults,
component: 'form',
direction: 'column',
gap: 'md',
alignItems: 'stretch',

};

export { FormPlate, theme };
5 changes: 4 additions & 1 deletion src/atoms/dataEntry/Form/FormSection.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@ const FormSection = ({ children, ...rest }: FormSectionProps) => (
<FlexLayout
{ ...rest }
stretch
gap="sm"
direction="column"
>
{ children }
</FlexLayout>
);

FormSection.defaultProps = {
gap: 'sm',
};

export { FormSection };

2 changes: 1 addition & 1 deletion src/atoms/dataEntry/Form/FormSectionBody.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const FormSectionBody = ({ children, ...rest }: FormSectionBodyProps) => {
<FlexLayout
{ ...rest }
stretch
gap="md"
direction="column"
>
{ children }
Expand All @@ -25,6 +24,7 @@ const FormSectionBody = ({ children, ...rest }: FormSectionBodyProps) => {

FormSectionBody.defaultProps = {
alignItems: 'stretch',
gap: 'md',
};

export { FormSectionBody };
Expand Down
2 changes: 1 addition & 1 deletion storybook/__tests__/__snapshots__/storyshots.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3856,7 +3856,7 @@ exports[`Storyshots ATOMS/DATA ENTRY/Form with form error 1`] = `
</div>
`;

exports[`Storyshots ATOMS/DATA ENTRY/Form with form error is undefined 1`] = `
exports[`Storyshots ATOMS/DATA ENTRY/Form with form error is null 1`] = `
.emotion-28 {
margin: 2rem;
}
Expand Down

0 comments on commit e76722e

Please sign in to comment.