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/toolbar | |
| parent | 0145e687ccd49da08982f6e281ebcbdcb9ef74a7 (diff) | |
chore: complete Storybook stories
Diffstat (limited to 'src/components/organisms/toolbar')
5 files changed, 30 insertions, 16 deletions
diff --git a/src/components/organisms/toolbar/main-nav.stories.tsx b/src/components/organisms/toolbar/main-nav.stories.tsx index 04b22cb..831636f 100644 --- a/src/components/organisms/toolbar/main-nav.stories.tsx +++ b/src/components/organisms/toolbar/main-nav.stories.tsx @@ -1,6 +1,5 @@ import { ComponentMeta, ComponentStory } from '@storybook/react'; import { useState } from 'react'; -import { IntlProvider } from 'react-intl'; import MainNav from './main-nav'; /** @@ -46,19 +45,15 @@ export default { type: null, }, description: 'A callback function to change main nav state.', + table: { + category: 'Events', + }, type: { name: 'function', required: true, }, }, }, - decorators: [ - (Story) => ( - <IntlProvider locale="en"> - <Story /> - </IntlProvider> - ), - ], } as ComponentMeta<typeof MainNav>; const Template: ComponentStory<typeof MainNav> = ({ diff --git a/src/components/organisms/toolbar/search.stories.tsx b/src/components/organisms/toolbar/search.stories.tsx index 6aaffde..f0f65b4 100644 --- a/src/components/organisms/toolbar/search.stories.tsx +++ b/src/components/organisms/toolbar/search.stories.tsx @@ -35,11 +35,24 @@ export default { required: true, }, }, + searchPage: { + control: { + type: 'text', + }, + description: 'The search results page url.', + type: { + name: 'string', + required: true, + }, + }, setIsActive: { control: { type: null, }, description: 'A callback function to update modal state.', + table: { + category: 'Events', + }, type: { name: 'function', required: true, diff --git a/src/components/organisms/toolbar/settings.stories.tsx b/src/components/organisms/toolbar/settings.stories.tsx index 9d04932..08ec579 100644 --- a/src/components/organisms/toolbar/settings.stories.tsx +++ b/src/components/organisms/toolbar/settings.stories.tsx @@ -41,6 +41,9 @@ export default { type: null, }, description: 'Define the modal state: either opened or closed.', + table: { + category: 'Events', + }, type: { name: 'boolean', required: true, diff --git a/src/components/organisms/toolbar/settings.tsx b/src/components/organisms/toolbar/settings.tsx index 9985ba0..f558eb7 100644 --- a/src/components/organisms/toolbar/settings.tsx +++ b/src/components/organisms/toolbar/settings.tsx @@ -9,14 +9,7 @@ import SettingsModal, { import settingsStyles from './settings.module.scss'; import sharedStyles from './toolbar-items.module.scss'; -export type SettingsProps = Pick< - SettingsModalProps, - 'ackeeStorageKey' | 'motionStorageKey' | 'tooltipClassName' -> & { - /** - * Set additional classnames to the modal wrapper. - */ - className?: string; +export type SettingsProps = SettingsModalProps & { /** * The button state. */ diff --git a/src/components/organisms/toolbar/toolbar.stories.tsx b/src/components/organisms/toolbar/toolbar.stories.tsx index 1f07e79..d613442 100644 --- a/src/components/organisms/toolbar/toolbar.stories.tsx +++ b/src/components/organisms/toolbar/toolbar.stories.tsx @@ -54,6 +54,16 @@ export default { value: {}, }, }, + searchPage: { + control: { + type: 'text', + }, + description: 'The search results page url.', + type: { + name: 'string', + required: true, + }, + }, }, parameters: { layout: 'fullscreen', |
