Skip to content

Commit

Permalink
feat: chip component story 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
DongjaJ committed Jan 15, 2025
1 parent 5ffbc5b commit b64cffc
Showing 1 changed file with 95 additions and 0 deletions.
95 changes: 95 additions & 0 deletions src/ui/chip/chip.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
import type { Meta, StoryObj } from '@storybook/react';
import { fn } from '@storybook/test';
import { Chip } from './chip.tsx';

const meta: Meta = {
title: 'ui/Chip',
component: Chip,
parameters: {
layout: 'centered',
},
argTypes: {
state: {
options: ['default', 'active', 'tag'],
control: {
type: 'radio',
},
},
shape: {
options: ['pill', 'rect'],
control: {
type: 'radio',
},
},
color: {
options: ['default', 'grey', 'blue'],
control: {
type: 'radio',
},
},
},
tags: ['autodocs'],
} satisfies Meta<typeof Chip>;

export default meta;
type Story = StoryObj<typeof meta>;

export const Primary: Story = {
args: {
label: 'Chip (default, pill, default)',
state: 'default',
shape: 'pill',
color: 'default',
},
render: (args) => <Chip {...args}>chip</Chip>,
};

export const Second: Story = {
args: {
label: 'Chip (active, pill, default)',
state: 'active',
shape: 'pill',
color: 'default',
},
render: (args) => <Chip {...args}>chip</Chip>,
};

export const Third: Story = {
args: {
label: 'Chip (default, pill, default)',
state: 'default',
shape: 'rect',
color: 'default',
},
render: (args) => <Chip {...args}>chip</Chip>,
};

export const Fourth: Story = {
args: {
label: 'Chip (default, pill, default)',
state: 'active',
shape: 'rect',
color: 'default',
},
render: (args) => <Chip {...args}>chip</Chip>,
};

export const Fifth: Story = {
args: {
label: 'Chip (default, pill, default)',
state: 'tag',
shape: 'pill',
color: 'grey',
},
render: (args) => <Chip {...args}>chip</Chip>,
};

export const Sixth: Story = {
args: {
label: 'Chip (default, pill, default)',
state: 'tag',
shape: 'pill',
color: 'blue',
},
render: (args) => <Chip {...args}>chip</Chip>,
};

0 comments on commit b64cffc

Please sign in to comment.