diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-04-20 19:24:21 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-04-20 19:27:29 +0200 |
| commit | a08291b1586858fc894a27d56f55f87a88f8dbd3 (patch) | |
| tree | 0aa36c8add0ad0ecc07c0f7f20f5af3e2f7abe46 /src/components/organisms/forms/search-form.stories.tsx | |
| parent | 362cf45bc520a68a1c1be20e1189ca2307577dde (diff) | |
refactor(storybook): reorganize design system
Add more stories for each components and change some components
categories for better organization.
Diffstat (limited to 'src/components/organisms/forms/search-form.stories.tsx')
| -rw-r--r-- | src/components/organisms/forms/search-form.stories.tsx | 46 |
1 files changed, 37 insertions, 9 deletions
diff --git a/src/components/organisms/forms/search-form.stories.tsx b/src/components/organisms/forms/search-form.stories.tsx index 4ec1c21..7f4c7c0 100644 --- a/src/components/organisms/forms/search-form.stories.tsx +++ b/src/components/organisms/forms/search-form.stories.tsx @@ -1,10 +1,16 @@ import { ComponentMeta, ComponentStory } from '@storybook/react'; import { IntlProvider } from 'react-intl'; -import SearchFormComponent from './search-form'; +import SearchForm from './search-form'; +/** + * SearchForm - Storybook Meta + */ export default { title: 'Organisms/Forms', - component: SearchFormComponent, + component: SearchForm, + args: { + hideLabel: false, + }, argTypes: { className: { control: { @@ -19,16 +25,38 @@ export default { required: false, }, }, + hideLabel: { + control: { + type: 'boolean', + }, + description: 'Determine if the input label should be visually hidden.', + table: { + category: 'Options', + defaultValue: { summary: false }, + }, + type: { + name: 'boolean', + required: false, + }, + }, }, -} as ComponentMeta<typeof SearchFormComponent>; + decorators: [ + (Story) => ( + <IntlProvider locale="en"> + <Story /> + </IntlProvider> + ), + ], +} as ComponentMeta<typeof SearchForm>; -const Template: ComponentStory<typeof SearchFormComponent> = (args) => ( - <IntlProvider locale="en"> - <SearchFormComponent {...args} /> - </IntlProvider> +const Template: ComponentStory<typeof SearchForm> = (args) => ( + <SearchForm {...args} /> ); -export const SearchForm = Template.bind({}); -SearchForm.args = { +/** + * Forms Stories - Search + */ +export const Search = Template.bind({}); +Search.args = { hideLabel: true, }; |
