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/atoms | |
| parent | 0145e687ccd49da08982f6e281ebcbdcb9ef74a7 (diff) | |
chore: complete Storybook stories
Diffstat (limited to 'src/components/atoms')
8 files changed, 29 insertions, 37 deletions
diff --git a/src/components/atoms/buttons/button-link.stories.tsx b/src/components/atoms/buttons/button-link.stories.tsx index 2e1c040..d06aff3 100644 --- a/src/components/atoms/buttons/button-link.stories.tsx +++ b/src/components/atoms/buttons/button-link.stories.tsx @@ -47,6 +47,20 @@ export default { required: false, }, }, + external: { + control: { + type: 'boolean', + }, + description: 'Determine if the link is an external link.', + table: { + category: 'Options', + defaultValue: { summary: false }, + }, + type: { + name: 'boolean', + required: false, + }, + }, kind: { control: { type: 'select', diff --git a/src/components/atoms/icons/cc-by-sa.stories.tsx b/src/components/atoms/icons/cc-by-sa.stories.tsx index f2bc8f0..4229725 100644 --- a/src/components/atoms/icons/cc-by-sa.stories.tsx +++ b/src/components/atoms/icons/cc-by-sa.stories.tsx @@ -1,5 +1,4 @@ import { ComponentMeta, ComponentStory } from '@storybook/react'; -import { IntlProvider } from 'react-intl'; import CCBySAIcon from './cc-by-sa'; /** @@ -23,13 +22,6 @@ export default { }, }, }, - decorators: [ - (Story) => ( - <IntlProvider locale="en"> - <Story /> - </IntlProvider> - ), - ], } as ComponentMeta<typeof CCBySAIcon>; const Template: ComponentStory<typeof CCBySAIcon> = (args) => ( diff --git a/src/components/atoms/layout/copyright.stories.tsx b/src/components/atoms/layout/copyright.stories.tsx index b988165..612b114 100644 --- a/src/components/atoms/layout/copyright.stories.tsx +++ b/src/components/atoms/layout/copyright.stories.tsx @@ -1,6 +1,5 @@ import CCBySA from '@components/atoms/icons/cc-by-sa'; import { ComponentMeta, ComponentStory } from '@storybook/react'; -import { IntlProvider } from 'react-intl'; import CopyrightComponent from './copyright'; /** @@ -39,13 +38,6 @@ export default { }, }, }, - decorators: [ - (Story) => ( - <IntlProvider locale="en"> - <Story /> - </IntlProvider> - ), - ], } as ComponentMeta<typeof CopyrightComponent>; const Template: ComponentStory<typeof CopyrightComponent> = (args) => ( diff --git a/src/components/atoms/layout/sidebar.stories.tsx b/src/components/atoms/layout/sidebar.stories.tsx index 175af94..6876f95 100644 --- a/src/components/atoms/layout/sidebar.stories.tsx +++ b/src/components/atoms/layout/sidebar.stories.tsx @@ -1,5 +1,4 @@ import { ComponentMeta, ComponentStory } from '@storybook/react'; -import { IntlProvider } from 'react-intl'; import SidebarComponent from './sidebar'; /** @@ -46,13 +45,6 @@ export default { }, }, }, - decorators: [ - (Story) => ( - <IntlProvider locale="en"> - <Story /> - </IntlProvider> - ), - ], } as ComponentMeta<typeof SidebarComponent>; const Template: ComponentStory<typeof SidebarComponent> = (args) => ( diff --git a/src/components/atoms/links/sharing-link.stories.tsx b/src/components/atoms/links/sharing-link.stories.tsx index c91e938..e6bd11b 100644 --- a/src/components/atoms/links/sharing-link.stories.tsx +++ b/src/components/atoms/links/sharing-link.stories.tsx @@ -1,5 +1,4 @@ import { ComponentMeta, ComponentStory } from '@storybook/react'; -import { IntlProvider } from 'react-intl'; import SharingLinkComponent from './sharing-link'; /** @@ -41,9 +40,7 @@ export default { } as ComponentMeta<typeof SharingLinkComponent>; const Template: ComponentStory<typeof SharingLinkComponent> = (args) => ( - <IntlProvider locale="en"> - <SharingLinkComponent {...args} /> - </IntlProvider> + <SharingLinkComponent {...args} /> ); /** diff --git a/src/components/atoms/lists/description-list-item.stories.tsx b/src/components/atoms/lists/description-list-item.stories.tsx index e05493c..c7beb0d 100644 --- a/src/components/atoms/lists/description-list-item.stories.tsx +++ b/src/components/atoms/lists/description-list-item.stories.tsx @@ -52,7 +52,7 @@ export default { description: 'The item layout.', options: ['inline', 'inline-values', 'stacked'], table: { - category: 'Styles', + category: 'Options', defaultValue: { summary: 'stacked' }, }, type: { diff --git a/src/components/atoms/lists/list.stories.tsx b/src/components/atoms/lists/list.stories.tsx index 54fdd3a..eac3cd3 100644 --- a/src/components/atoms/lists/list.stories.tsx +++ b/src/components/atoms/lists/list.stories.tsx @@ -35,6 +35,19 @@ export default { value: {}, }, }, + itemsClassName: { + control: { + type: 'text', + }, + description: 'Set additional classnames to the list items.', + table: { + category: 'Styles', + }, + type: { + name: 'string', + required: false, + }, + }, kind: { control: { type: 'select', diff --git a/src/components/atoms/loaders/spinner.stories.tsx b/src/components/atoms/loaders/spinner.stories.tsx index dc577dc..1792c6c 100644 --- a/src/components/atoms/loaders/spinner.stories.tsx +++ b/src/components/atoms/loaders/spinner.stories.tsx @@ -1,5 +1,4 @@ import { ComponentMeta, ComponentStory } from '@storybook/react'; -import { IntlProvider } from 'react-intl'; import SpinnerComponent from './spinner'; /** @@ -23,13 +22,6 @@ export default { }, }, }, - decorators: [ - (Story) => ( - <IntlProvider locale="en"> - <Story /> - </IntlProvider> - ), - ], } as ComponentMeta<typeof SpinnerComponent>; const Template: ComponentStory<typeof SpinnerComponent> = (args) => ( |
