Skip to content

Commit

Permalink
fix: fix fieldbase width
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahgm committed Nov 24, 2022
1 parent 302f67d commit 1144faa
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/components/src/FieldBase/FieldBase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ export const FieldBase = ({
const style = useComponentStyles('Field', { variant, size });

return (
<Box __baseCSS={{ width }} css={style}>
<Box
__baseCSS={{ display: 'flex', flexDirection: 'column', width }}
css={style}
>
{label && (
<Label
required={required}
Expand All @@ -63,7 +66,7 @@ export const FieldBase = ({
{label}
</Label>
)}
<div>
<Box __baseCSS={{ display: 'flex', flexDirection: 'column' }}>
{children}
{hasHelpText && (
<HelpText
Expand All @@ -78,7 +81,7 @@ export const FieldBase = ({
errorMessageProps={errorMessageProps}
/>
)}
</div>
</Box>
</Box>
);
};

0 comments on commit 1144faa

Please sign in to comment.