fix(validator stories): add decorator for router

This commit is contained in:
RadoslavDimchev 2024-03-23 18:13:11 +02:00 committed by Emil Ivanichkov
parent e14ffc08c6
commit 9b7cf9febd
3 changed files with 6 additions and 0 deletions

View File

@ -1,4 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react'
import { withRouter } from 'storybook-addon-react-router-v6'
import ValidatorListItem from './ValidatorListItem'
@ -8,6 +9,7 @@ const meta = {
parameters: {
layout: 'centered',
},
decorators: [withRouter()],
tags: ['autodocs'],
} satisfies Meta<typeof ValidatorListItem>

View File

@ -1,4 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react'
import { withRouter } from 'storybook-addon-react-router-v6'
import ValidatorNameAddress from './ValidatorNameAddress'
@ -6,6 +7,7 @@ const meta = {
title: 'General/ValidatorNameAddress',
component: ValidatorNameAddress,
tags: ['autodocs'],
decorators: [withRouter()],
} satisfies Meta<typeof ValidatorNameAddress>
export default meta

View File

@ -1,4 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react'
import { withRouter } from 'storybook-addon-react-router-v6'
import ValidatorProfile from './ValidatorProfile'
@ -6,6 +7,7 @@ const meta = {
title: 'General/ValidatorProfile',
component: ValidatorProfile,
tags: ['autodocs'],
decorators: [withRouter()],
} satisfies Meta<typeof ValidatorProfile>
export default meta