diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-05-31 19:40:23 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-06-01 22:32:09 +0200 |
| commit | 8320b1d39ea6402c32e907dbb35082efc6af9f5a (patch) | |
| tree | b5ee9586a4ec91aa15c92dcb513b551716fd4416 /src/components/molecules/forms/motion-toggle.stories.tsx | |
| parent | 994ad1bec193b2d1a6e0d38d6ef3f3d2bd66c3ea (diff) | |
chore: replace the toggle component
Diffstat (limited to 'src/components/molecules/forms/motion-toggle.stories.tsx')
| -rw-r--r-- | src/components/molecules/forms/motion-toggle.stories.tsx | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/src/components/molecules/forms/motion-toggle.stories.tsx b/src/components/molecules/forms/motion-toggle.stories.tsx index e9939bd..5c524a8 100644 --- a/src/components/molecules/forms/motion-toggle.stories.tsx +++ b/src/components/molecules/forms/motion-toggle.stories.tsx @@ -1,5 +1,6 @@ import { ComponentMeta, ComponentStory } from '@storybook/react'; import MotionToggleComponent from './motion-toggle'; +import { storageKey } from './motion-toggle.fixture'; /** * MotionToggle - Storybook Meta @@ -8,24 +9,22 @@ export default { title: 'Molecules/Forms/Toggle', component: MotionToggleComponent, argTypes: { - className: { + defaultValue: { control: { - type: 'text', - }, - description: 'Set additional classnames to the toggle wrapper.', - table: { - category: 'Styles', + type: 'select', }, + description: 'Set the default value.', + options: ['on', 'off'], type: { name: 'string', - required: false, + required: true, }, }, - labelClassName: { + legendClassName: { control: { type: 'text', }, - description: 'Set additional classnames to the label wrapper.', + description: 'Set additional classnames to the legend.', table: { category: 'Styles', }, @@ -44,16 +43,6 @@ export default { required: true, }, }, - value: { - control: { - type: null, - }, - description: 'The reduce motion value.', - type: { - name: 'boolean', - required: true, - }, - }, }, } as ComponentMeta<typeof MotionToggleComponent>; @@ -66,5 +55,6 @@ const Template: ComponentStory<typeof MotionToggleComponent> = (args) => ( */ export const Motion = Template.bind({}); Motion.args = { - value: false, + defaultValue: 'on', + storageKey, }; |
