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 Markdown from './Markdown'
import { withRouter } from 'storybook-addon-react-router-v6'
const meta = {
title: 'General/Markdown',
@ -9,6 +10,7 @@ const meta = {
layout: 'centered',
},
tags: ['autodocs'],
decorators: [withRouter()]
} satisfies Meta<typeof Markdown>
export default meta

View File

@ -1,6 +1,7 @@
import type { Meta, StoryObj } from '@storybook/react'
import ValidatorSetupInstall from './ValidatorInstall'
import { withRouter } from 'storybook-addon-react-router-v6'
const meta = {
title: 'ValidatorOnboarding/ValidatorSetupInstall',
@ -9,7 +10,7 @@ const meta = {
layout: 'centered',
},
tags: ['autodocs'],
decorators: [StoryObj => <StoryObj />],
decorators: [StoryObj => <StoryObj />, withRouter()],
} satisfies Meta<typeof ValidatorSetupInstall>
export default meta