Skip to content

Commit

Permalink
chore: story added
Browse files Browse the repository at this point in the history
  • Loading branch information
DanisAvko committed Sep 23, 2024
1 parent 343025e commit 5197496
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/Table/__stories__/Table.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -21,6 +22,10 @@ export const Default: StoryObj<typeof DefaultStory> = {
render: DefaultStory,
};

export const DefaultSizeS: StoryObj<typeof DefaultSizeSStory> = {
render: DefaultSizeSStory,
};

export const WithSelection: StoryObj<typeof WithSelectionStory> = {
render: WithSelectionStory,
};
Expand Down
15 changes: 15 additions & 0 deletions src/components/Table/__stories__/stories/DefaultSizeSStory.tsx
Original file line number Diff line number Diff line change
@@ -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 <Table table={table} size="s" />;
};

0 comments on commit 5197496

Please sign in to comment.