Skip to content

Commit

Permalink
Allow non-full-width fields in FieldSet (#3097)
Browse files Browse the repository at this point in the history
Co-authored-by: Johannes Obermair <48853629+johnnyomair@users.noreply.github.com>
  • Loading branch information
juliawegmayr and johnnyomair authored Jan 16, 2025
1 parent 97fafac commit eeb21ce
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/sharp-dryers-happen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@comet/admin": patch
---

Allow non-full-width fields in `FieldSet`
2 changes: 0 additions & 2 deletions packages/admin/admin/src/common/FieldSet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,6 @@ const Children = createComponentSlot(MuiAccordionDetails)<FieldSetClassKey, Owne
},
})(
({ theme, ownerState }) => css`
display: flex;
flex-direction: column;
padding: 20px;
${!ownerState.hiddenSummary &&
Expand Down
5 changes: 1 addition & 4 deletions storybook/src/admin/form/FieldContainer.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@ export const FieldContainer = () => {
<TextField name="textFieldWithLabelTwo" label="TextField label" variant="horizontal" />
<TextField name="testWithoutLabel" variant="horizontal" placeholder="TextField without label" />
</FieldSet>
<FieldSet
title="VERTICAL (auto-width)"
slotProps={{ children: { sx: { display: "block" } } }} // TODO: Use `FieldSet` here once it supports non-full-width fields (https://vivid-planet.atlassian.net/browse/COM-1430)
>
<FieldSet title="VERTICAL (auto-width)">
<TextField name="textFieldWithLabelOne" label="TextField label" variant="vertical" />
<TextField name="textFieldWithLabelTwo" label="TextField label" variant="vertical" />
<TextField name="testWithoutLabel" variant="vertical" placeholder="TextField without label" />
Expand Down

0 comments on commit eeb21ce

Please sign in to comment.