From 5d20e3b8a09fc7bf4c7b9bceb62106a5f53e1cbc Mon Sep 17 00:00:00 2001 From: Charles de Dreuille Date: Mon, 14 Jul 2025 16:36:48 +0200 Subject: [PATCH] Fix stories Signed-off-by: Charles de Dreuille --- .../src/components/DataTable/DataTable.stories.tsx | 10 +++++++++- .../Table/TableCellLink/TableCellLink.stories.tsx | 10 +++++++++- .../TableCellProfile/TableCellProfile.stories.tsx | 10 +++++++++- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/packages/canon/src/components/DataTable/DataTable.stories.tsx b/packages/canon/src/components/DataTable/DataTable.stories.tsx index 266aedc533..29f38e7bc2 100644 --- a/packages/canon/src/components/DataTable/DataTable.stories.tsx +++ b/packages/canon/src/components/DataTable/DataTable.stories.tsx @@ -14,7 +14,7 @@ * limitations under the License. */ -import type { Meta, StoryObj } from '@storybook/react'; +import type { Meta, StoryFn, StoryObj } from '@storybook/react'; import { DataTable } from '.'; import { data, DataProps } from './mocked-components'; import { columns } from './mocked-columns'; @@ -26,9 +26,17 @@ import { PaginationState, } from '@tanstack/react-table'; import { useState } from 'react'; +import { MemoryRouter } from 'react-router-dom'; const meta = { title: 'Components/DataTable', + decorators: [ + (Story: StoryFn) => ( + + + + ), + ], } satisfies Meta; export default meta; diff --git a/packages/canon/src/components/Table/TableCellLink/TableCellLink.stories.tsx b/packages/canon/src/components/Table/TableCellLink/TableCellLink.stories.tsx index 8092d46867..bc9b66f18a 100644 --- a/packages/canon/src/components/Table/TableCellLink/TableCellLink.stories.tsx +++ b/packages/canon/src/components/Table/TableCellLink/TableCellLink.stories.tsx @@ -14,12 +14,20 @@ * limitations under the License. */ -import type { Meta, StoryObj } from '@storybook/react'; +import type { Meta, StoryFn, StoryObj } from '@storybook/react'; import { TableCellLink } from './TableCellLink'; +import { MemoryRouter } from 'react-router-dom'; const meta = { title: 'Components/Table/TableCellLink', component: TableCellLink, + decorators: [ + (Story: StoryFn) => ( + + + + ), + ], } satisfies Meta; export default meta; diff --git a/packages/canon/src/components/Table/TableCellProfile/TableCellProfile.stories.tsx b/packages/canon/src/components/Table/TableCellProfile/TableCellProfile.stories.tsx index 5ee482f4fc..230fc0e3d1 100644 --- a/packages/canon/src/components/Table/TableCellProfile/TableCellProfile.stories.tsx +++ b/packages/canon/src/components/Table/TableCellProfile/TableCellProfile.stories.tsx @@ -14,12 +14,20 @@ * limitations under the License. */ -import type { Meta, StoryObj } from '@storybook/react'; +import type { Meta, StoryFn, StoryObj } from '@storybook/react'; import { TableCellProfile } from './TableCellProfile'; +import { MemoryRouter } from 'react-router-dom'; const meta = { title: 'Components/Table/TableCellProfile', component: TableCellProfile, + decorators: [ + (Story: StoryFn) => ( + + + + ), + ], } satisfies Meta; export default meta;