Fix stories

Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
This commit is contained in:
Charles de Dreuille
2025-07-14 16:36:48 +02:00
parent 8ecf4568c9
commit 5d20e3b8a0
3 changed files with 27 additions and 3 deletions
@@ -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) => (
<MemoryRouter>
<Story />
</MemoryRouter>
),
],
} satisfies Meta;
export default meta;
@@ -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) => (
<MemoryRouter>
<Story />
</MemoryRouter>
),
],
} satisfies Meta<typeof TableCellLink>;
export default meta;
@@ -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) => (
<MemoryRouter>
<Story />
</MemoryRouter>
),
],
} satisfies Meta<typeof TableCellProfile>;
export default meta;