diff options
| author | Armand Philippot <git@armandphilippot.com> | 2023-12-15 18:35:16 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2023-12-15 18:49:49 +0100 |
| commit | 0f936ec0e7606cb79434d94096b6e113a7ce78eb (patch) | |
| tree | 465ec7f66ac9459be6a18ac046e10357814c7b92 /src/components/molecules/nav/nav-list/nav-list.stories.tsx | |
| parent | 4e4d2eb25365be861e19f9756cf334ba2faa6911 (diff) | |
refactor(stories): migrate stories to CSF3 format
Diffstat (limited to 'src/components/molecules/nav/nav-list/nav-list.stories.tsx')
| -rw-r--r-- | src/components/molecules/nav/nav-list/nav-list.stories.tsx | 41 |
1 files changed, 17 insertions, 24 deletions
diff --git a/src/components/molecules/nav/nav-list/nav-list.stories.tsx b/src/components/molecules/nav/nav-list/nav-list.stories.tsx index c165ac7..702acfe 100644 --- a/src/components/molecules/nav/nav-list/nav-list.stories.tsx +++ b/src/components/molecules/nav/nav-list/nav-list.stories.tsx @@ -1,19 +1,16 @@ -import type { ComponentMeta, ComponentStory } from '@storybook/react'; +import type { Meta, StoryObj } from '@storybook/react'; import { NavItem } from '../nav-item'; import { NavLink } from '../nav-link'; import { NavList } from './nav-list'; -/** - * Nav - Storybook Meta - */ -export default { - title: 'Molecules/Nav/NavList', +const meta = { component: NavList, -} as ComponentMeta<typeof NavList>; + title: 'Molecules/Nav/List', +} satisfies Meta<typeof NavList>; -const Template: ComponentStory<typeof NavList> = (args) => ( - <NavList {...args} /> -); +export default meta; + +type Story = StoryObj<typeof meta>; const NavItems = () => ( <> @@ -32,20 +29,16 @@ const NavItems = () => ( </> ); -/** - * NavList Stories - Default - */ -export const Default = Template.bind({}); -Default.args = { - children: <NavItems />, +export const Example: Story = { + args: { + children: <NavItems />, + }, }; -/** - * NavList Stories - Inlined - */ -export const Inlined = Template.bind({}); -Inlined.args = { - children: <NavItems />, - isInline: true, - spacing: 'sm', +export const Inlined: Story = { + args: { + children: <NavItems />, + isInline: true, + spacing: 'sm', + }, }; |
