diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-05-21 18:42:19 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-05-21 19:24:48 +0200 |
| commit | 4581c262ca06704baaa3c0a172d509207f41f5c3 (patch) | |
| tree | 45ef2fe8eafbcb3c54d7e4bee708299da40c715c /src/components/organisms/forms | |
| parent | 0145e687ccd49da08982f6e281ebcbdcb9ef74a7 (diff) | |
chore: complete Storybook stories
Diffstat (limited to 'src/components/organisms/forms')
4 files changed, 54 insertions, 8 deletions
diff --git a/src/components/organisms/forms/comment-form.stories.tsx b/src/components/organisms/forms/comment-form.stories.tsx index 8b11df7..1a9e7b7 100644 --- a/src/components/organisms/forms/comment-form.stories.tsx +++ b/src/components/organisms/forms/comment-form.stories.tsx @@ -13,6 +13,8 @@ export default { component: CommentForm, args: { saveComment, + titleAlignment: 'left', + titleLevel: 2, }, argTypes: { className: { @@ -56,6 +58,9 @@ export default { type: null, }, description: 'A callback function to process the comment form data.', + table: { + category: 'Events', + }, type: { name: 'function', required: true, @@ -74,6 +79,21 @@ export default { required: false, }, }, + titleAlignment: { + control: { + type: 'select', + }, + description: 'The heading alignment.', + options: ['center', 'left'], + table: { + category: 'Options', + defaultValue: { summary: 'left' }, + }, + type: { + name: 'string', + required: false, + }, + }, titleLevel: { control: { type: 'number', @@ -83,6 +103,7 @@ export default { description: 'The title level (hn).', table: { category: 'Options', + defaultValue: { summary: 2 }, }, type: { name: 'number', diff --git a/src/components/organisms/forms/contact-form.stories.tsx b/src/components/organisms/forms/contact-form.stories.tsx index 39d0b71..191d448 100644 --- a/src/components/organisms/forms/contact-form.stories.tsx +++ b/src/components/organisms/forms/contact-form.stories.tsx @@ -1,5 +1,4 @@ import { ComponentMeta, ComponentStory } from '@storybook/react'; -import { IntlProvider } from 'react-intl'; import ContactForm from './contact-form'; /** @@ -40,19 +39,15 @@ export default { type: null, }, description: 'A callback function to process the contact form data.', + table: { + category: 'Events', + }, type: { name: 'function', required: true, }, }, }, - decorators: [ - (Story) => ( - <IntlProvider locale="en"> - <Story /> - </IntlProvider> - ), - ], } as ComponentMeta<typeof ContactForm>; const Template: ComponentStory<typeof ContactForm> = (args) => ( diff --git a/src/components/organisms/forms/search-form.stories.tsx b/src/components/organisms/forms/search-form.stories.tsx index 6ea6122..d8c8e1e 100644 --- a/src/components/organisms/forms/search-form.stories.tsx +++ b/src/components/organisms/forms/search-form.stories.tsx @@ -39,6 +39,16 @@ export default { required: false, }, }, + searchPage: { + control: { + type: 'text', + }, + description: 'The search results page url.', + type: { + name: 'string', + required: true, + }, + }, }, } as ComponentMeta<typeof SearchForm>; diff --git a/src/components/organisms/forms/settings-form.stories.tsx b/src/components/organisms/forms/settings-form.stories.tsx index 46305e7..70e1844 100644 --- a/src/components/organisms/forms/settings-form.stories.tsx +++ b/src/components/organisms/forms/settings-form.stories.tsx @@ -8,6 +8,16 @@ export default { title: 'Organisms/Forms', component: SettingsForm, argTypes: { + ackeeStorageKey: { + control: { + type: 'text', + }, + description: 'The local storage key for Ackee setting.', + type: { + name: 'string', + required: true, + }, + }, className: { control: { type: 'text', @@ -21,6 +31,16 @@ export default { required: false, }, }, + motionStorageKey: { + control: { + type: 'text', + }, + description: 'The local storage key for reduced motion setting.', + type: { + name: 'string', + required: true, + }, + }, tooltipClassName: { control: { type: 'text', |
