Skip to content

Commit

Permalink
docs(checkbox): add playground and controls (#11536)
Browse files Browse the repository at this point in the history
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
aledavila and kodiakhq[bot] authored Jun 9, 2022
1 parent 853cbf9 commit b45604c
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions packages/react/src/components/Checkbox/Checkbox.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,46 @@ export const CheckboxStory = () => {
CheckboxStory.storyName = 'Checkbox';

export const Skeleton = () => <CheckboxSkeleton />;

export const Playground = (args) => (
<fieldset className={`${prefix}--fieldset`}>
<legend className={`${prefix}--label`}>Checkbox heading</legend>
<Checkbox labelText={`Checkbox label`} id="checkbox-label-1" {...args} />
<Checkbox labelText={`Checkbox label`} id="checkbox-label-2" {...args} />
</fieldset>
);

Playground.argTypes = {
checked: {
control: {
type: 'boolean',
},
},
className: {
control: false,
},
defaultChecked: {
control: false,
},
disabled: {
control: {
type: 'boolean',
},
},
hideLabel: {
control: {
type: 'boolean',
},
},
id: {
control: false,
},
indeterminate: {
control: {
type: 'boolean',
},
},
labelText: {
control: false,
},
};

0 comments on commit b45604c

Please sign in to comment.