-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat:
CheckboxGroup
can now be used as a compound component (#4188)
* feat: `CheckboxGroup` can now be used as a compound component `<CheckboxGroup>` -> `<Checkbox.Group>` * Create thick-masks-compete.md
- Loading branch information
Showing
5 changed files
with
63 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
"@marigold/docs": patch | ||
"@marigold/components": patch | ||
--- | ||
|
||
feat: `CheckboxGroup` can now be used as a compound component | ||
|
||
- Refactored the `CheckboxGroup` to be a compound component and align it with other components: `<CheckboxGroup>` -> `<Checkbox.Group>` | ||
- Adjusted the Checkbox appearance demo a bit |
16 changes: 8 additions & 8 deletions
16
docs/content/components/form/checkbox/checkbox-appearance.demo.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { CheckboxGroup, CheckboxGroupProps } from '@marigold/components'; | ||
import { Checkbox } from '@marigold/components'; | ||
import type { CheckboxProps } from '@marigold/components'; | ||
import { Checkbox, FieldGroup } from '@marigold/components'; | ||
|
||
export default (props: CheckboxGroupProps) => ( | ||
<CheckboxGroup {...props}> | ||
<Checkbox value="ham">Ham</Checkbox> | ||
<Checkbox value="cucumber">Cucumber</Checkbox> | ||
<Checkbox value="onions">Onions</Checkbox> | ||
</CheckboxGroup> | ||
export default (props: CheckboxProps) => ( | ||
<FieldGroup labelWidth="0px"> | ||
<Checkbox {...props}> | ||
I agree to the Terms of Service and Privacy Policy | ||
</Checkbox> | ||
</FieldGroup> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters