diff --git a/packages/frontend/src/stories/Components/Tag.stories.tsx b/packages/frontend/src/stories/Components/Tag.stories.tsx index e65b31f..79d0ea6 100644 --- a/packages/frontend/src/stories/Components/Tag.stories.tsx +++ b/packages/frontend/src/stories/Components/Tag.stories.tsx @@ -1,7 +1,17 @@ import { StoryObj, Meta } from '@storybook/react'; -import { Tag } from 'components/shared/Tag'; -import { CheckIcon, PlusIcon } from 'components/shared/CustomIcon'; +import { Tag, TagTheme } from 'components/shared/Tag'; +import { PlusIcon } from 'components/shared/CustomIcon'; + +const tagTypes: TagTheme['type'][] = [ + 'attention', + 'negative', + 'positive', + 'emphasized', + 'neutral', +]; +const tagStyles: TagTheme['style'][] = ['default', 'minimal']; +const tagSizes: TagTheme['size'][] = ['xs', 'sm']; const meta: Meta = { title: 'Components/Tag', @@ -12,7 +22,7 @@ const meta: Meta = { }, argTypes: { children: { - control: 'text', + control: 'object', }, leftIcon: { control: 'object', @@ -22,15 +32,15 @@ const meta: Meta = { }, type: { control: 'select', - options: ['attention', 'negative', 'positive', 'emphasized', 'neutral'], + options: tagTypes, }, style: { control: 'select', - options: ['default', 'outlined'], + options: tagStyles, }, size: { control: 'select', - options: ['xs', 'sm'], + options: tagSizes, }, }, }; @@ -40,18 +50,6 @@ export default meta; type Story = StoryObj; export const Default: Story = { - render: ({ children, leftIcon, rightIcon, type, style, size, ...arg }) => ( - - {children} - - ), args: { children: 'Tag', style: 'default', @@ -61,15 +59,13 @@ export const Default: Story = { }; export const WithLeftIcon: Story = { - render: ({ ...arg }) => , args: { ...Default.args, - leftIcon: , + leftIcon: , }, }; export const WithRightIcon: Story = { - render: ({ ...arg }) => , args: { ...Default.args, rightIcon: ,