fix: add router decorators to stories

This commit is contained in:
RadoslavDimchev 2023-10-27 09:35:53 +03:00
parent 1e006040d4
commit ae3158cae1
2 changed files with 4 additions and 1 deletions

View File

@ -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

View File

@ -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