fix: add router decorators to stories
This commit is contained in:
parent
1e006040d4
commit
ae3158cae1
|
@ -1,6 +1,7 @@
|
||||||
import type { Meta, StoryObj } from '@storybook/react'
|
import type { Meta, StoryObj } from '@storybook/react'
|
||||||
|
|
||||||
import Markdown from './Markdown'
|
import Markdown from './Markdown'
|
||||||
|
import { withRouter } from 'storybook-addon-react-router-v6'
|
||||||
|
|
||||||
const meta = {
|
const meta = {
|
||||||
title: 'General/Markdown',
|
title: 'General/Markdown',
|
||||||
|
@ -9,6 +10,7 @@ const meta = {
|
||||||
layout: 'centered',
|
layout: 'centered',
|
||||||
},
|
},
|
||||||
tags: ['autodocs'],
|
tags: ['autodocs'],
|
||||||
|
decorators: [withRouter()]
|
||||||
} satisfies Meta<typeof Markdown>
|
} satisfies Meta<typeof Markdown>
|
||||||
|
|
||||||
export default meta
|
export default meta
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import type { Meta, StoryObj } from '@storybook/react'
|
import type { Meta, StoryObj } from '@storybook/react'
|
||||||
|
|
||||||
import ValidatorSetupInstall from './ValidatorInstall'
|
import ValidatorSetupInstall from './ValidatorInstall'
|
||||||
|
import { withRouter } from 'storybook-addon-react-router-v6'
|
||||||
|
|
||||||
const meta = {
|
const meta = {
|
||||||
title: 'ValidatorOnboarding/ValidatorSetupInstall',
|
title: 'ValidatorOnboarding/ValidatorSetupInstall',
|
||||||
|
@ -9,7 +10,7 @@ const meta = {
|
||||||
layout: 'centered',
|
layout: 'centered',
|
||||||
},
|
},
|
||||||
tags: ['autodocs'],
|
tags: ['autodocs'],
|
||||||
decorators: [StoryObj => <StoryObj />],
|
decorators: [StoryObj => <StoryObj />, withRouter()],
|
||||||
} satisfies Meta<typeof ValidatorSetupInstall>
|
} satisfies Meta<typeof ValidatorSetupInstall>
|
||||||
|
|
||||||
export default meta
|
export default meta
|
||||||
|
|
Loading…
Reference in New Issue