From 2f2ed6ede5b00cf3714601e665fe91ff3b129dae Mon Sep 17 00:00:00 2001 From: Eugene Kim Date: Mon, 30 Oct 2023 02:29:44 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20Label=20=EC=BB=B4=ED=8F=AC=EB=84=8C?= =?UTF-8?q?=ED=8A=B8=20=EA=B8=B0=EB=8A=A5=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/common/index.tsx | 2 + src/components/common/label/Label.stories.tsx | 54 +++++++++++++++++++ src/components/common/label/Label.tsx | 53 ++++++++++++++++++ src/components/common/label/LabelType.ts | 49 +++++++++++++++++ 4 files changed, 158 insertions(+) create mode 100644 src/components/common/label/Label.stories.tsx create mode 100644 src/components/common/label/Label.tsx create mode 100644 src/components/common/label/LabelType.ts diff --git a/src/components/common/index.tsx b/src/components/common/index.tsx index ea373f83..ce1c9c47 100644 --- a/src/components/common/index.tsx +++ b/src/components/common/index.tsx @@ -1,2 +1,4 @@ // eslint-disable-next-line react-refresh/only-export-components export * from './selectweek/SelectWeek' +export * from './label/Label' +export * from './icon/Icon' diff --git a/src/components/common/label/Label.stories.tsx b/src/components/common/label/Label.stories.tsx new file mode 100644 index 00000000..b4453685 --- /dev/null +++ b/src/components/common/label/Label.stories.tsx @@ -0,0 +1,54 @@ +import type { Meta, StoryObj } from '@storybook/react' + +import Label from './Label' + +const meta: Meta = { + title: 'Components/Label', + component: Label, + argTypes: { + label: { + control: 'text' + }, + color: { + control: 'select', + options: ['default', 'selected', 'disabled'] + }, + icon: { + control: 'select', + options: [ + 'Abacus', + 'Computer', + 'English', + 'Etc', + 'Korean', + 'Math', + 'Music', + 'Science', + 'Music', + 'Social', + 'Synthesis', + 'Write' + ] + } + } +} + +export default meta +type Story = StoryObj + +export const Medium: Story = { + render: (args) => ( +