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/templates/page/loading-page-comments.stories.tsx | |
| parent | 4e4d2eb25365be861e19f9756cf334ba2faa6911 (diff) | |
refactor(stories): migrate stories to CSF3 format
Diffstat (limited to 'src/components/templates/page/loading-page-comments.stories.tsx')
| -rw-r--r-- | src/components/templates/page/loading-page-comments.stories.tsx | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/src/components/templates/page/loading-page-comments.stories.tsx b/src/components/templates/page/loading-page-comments.stories.tsx index 6069068..1ebb4bd 100644 --- a/src/components/templates/page/loading-page-comments.stories.tsx +++ b/src/components/templates/page/loading-page-comments.stories.tsx @@ -1,22 +1,29 @@ -import type { ComponentMeta, ComponentStory } from '@storybook/react'; -import { LoadingPageComments } from './loading-page-comments'; +import type { Meta, StoryObj } from '@storybook/react'; +import { + LoadingPageComments, + type LoadingPageCommentsProps, +} from './loading-page-comments'; +import { Page } from './page'; -/** - * LoadingPageComments - Storybook Meta - */ -export default { - title: 'Templates/LoadingPageComments', +const WrappedLoadingPageComments = (props: LoadingPageCommentsProps) => ( + <Page> + <LoadingPageComments {...props} /> + </Page> +); + +const meta = { component: LoadingPageComments, + title: 'Templates/Page/LoadingPageComments', + render: WrappedLoadingPageComments, parameters: { layout: 'fullscreen', }, -} as ComponentMeta<typeof LoadingPageComments>; +} satisfies Meta<typeof LoadingPageComments>; -const Template: ComponentStory<typeof LoadingPageComments> = (args) => ( - <LoadingPageComments {...args} /> -); +export default meta; + +type Story = StoryObj<typeof meta>; -/** - * LoadingPageComments Stories - Example - */ -export const Example = Template.bind({}); +export const Default: Story = { + args: {}, +}; |
