From 4581c262ca06704baaa3c0a172d509207f41f5c3 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Sat, 21 May 2022 18:42:19 +0200 Subject: chore: complete Storybook stories --- src/components/organisms/toolbar/main-nav.stories.tsx | 11 +++-------- src/components/organisms/toolbar/search.stories.tsx | 13 +++++++++++++ src/components/organisms/toolbar/settings.stories.tsx | 3 +++ src/components/organisms/toolbar/settings.tsx | 9 +-------- src/components/organisms/toolbar/toolbar.stories.tsx | 10 ++++++++++ 5 files changed, 30 insertions(+), 16 deletions(-) (limited to 'src/components/organisms/toolbar') 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) => ( - - - - ), - ], } as ComponentMeta; const Template: ComponentStory = ({ 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', -- cgit v1.2.3