From 5197496c954269d9e97f4d6b532de678997ac6ab Mon Sep 17 00:00:00 2001 From: DanisAvko Date: Mon, 23 Sep 2024 13:33:28 +0300 Subject: [PATCH] chore: story added --- .../Table/__stories__/Table.stories.tsx | 5 +++++ .../__stories__/stories/DefaultSizeSStory.tsx | 15 +++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 src/components/Table/__stories__/stories/DefaultSizeSStory.tsx diff --git a/src/components/Table/__stories__/Table.stories.tsx b/src/components/Table/__stories__/Table.stories.tsx index 173c78f..eadf72e 100644 --- a/src/components/Table/__stories__/Table.stories.tsx +++ b/src/components/Table/__stories__/Table.stories.tsx @@ -2,6 +2,7 @@ import type {Meta, StoryObj} from '@storybook/react'; import {Table} from '../index'; +import {DefaultSizeSStory} from './stories/DefaultSizeSStory'; import {DefaultStory} from './stories/DefaultStory'; import {ReorderingStory} from './stories/ReorderingStory'; import {ReorderingWithVirtualizationStory} from './stories/ReorderingWithVirtualizationStory'; @@ -21,6 +22,10 @@ export const Default: StoryObj = { render: DefaultStory, }; +export const DefaultSizeS: StoryObj = { + render: DefaultSizeSStory, +}; + export const WithSelection: StoryObj = { render: WithSelectionStory, }; diff --git a/src/components/Table/__stories__/stories/DefaultSizeSStory.tsx b/src/components/Table/__stories__/stories/DefaultSizeSStory.tsx new file mode 100644 index 0000000..b35c45b --- /dev/null +++ b/src/components/Table/__stories__/stories/DefaultSizeSStory.tsx @@ -0,0 +1,15 @@ +import React from 'react'; + +import {useTable} from '../../../../hooks'; +import {columns} from '../../../BaseTable/__stories__/constants/columns'; +import {data} from '../../../BaseTable/__stories__/constants/data'; +import {Table} from '../../index'; + +export const DefaultSizeSStory = () => { + const table = useTable({ + columns, + data, + }); + + return ; +};