-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ui) Tag 컴포넌트에 className prop을 추가합니다. (#232)
* feat: Add className prop in Tag component * cs
- Loading branch information
Showing
4 changed files
with
23 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@sopt-makers/ui': patch | ||
--- | ||
|
||
Tag 컴포넌트에 ClassName Prop을 추가해 커스텀 스타일이 가능케 합니다. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,26 @@ | ||
import { Meta, StoryObj } from "@storybook/react"; | ||
import { Meta, StoryObj } from '@storybook/react'; | ||
|
||
import { type HTMLAttributes } from "react"; | ||
import { Tag } from "@sopt-makers/ui"; | ||
|
||
interface TagOwnProps extends HTMLAttributes<HTMLSpanElement> { | ||
children?: string; | ||
size?: "sm" | "md" | "lg"; | ||
shape?: "rect" | "pill"; | ||
variant?: "default" | "primary" | "secondary"; | ||
type?: "solid" | "line"; | ||
} | ||
|
||
type TagStoryProps = TagOwnProps & { children: string }; | ||
import { Tag, TagProps } from '@sopt-makers/ui'; | ||
|
||
export default { | ||
title: "Components/Tag", | ||
title: 'Components/Tag', | ||
component: Tag, | ||
tags: ["autodocs"], | ||
tags: ['autodocs'], | ||
argTypes: { | ||
size: { control: 'radio', options: ['sm', 'md', 'lg'] }, | ||
shape: { control: 'radio', options: ['rect', 'pill'] }, | ||
variant: { control: 'radio', options: ['default', 'primary', 'secondary'] }, | ||
type: { control: 'radio', options: ['solid', 'line'] }, | ||
} | ||
} as Meta<TagStoryProps>; | ||
}, | ||
} as Meta<TagProps>; | ||
|
||
// 기본 태그 스토리 | ||
export const Default: StoryObj<TagStoryProps> = { | ||
export const Default: StoryObj<TagProps> = { | ||
args: { | ||
children: "Default Tag", | ||
size: "sm", | ||
shape: "rect", | ||
variant: "default", | ||
type: "solid", | ||
children: 'Default Tag', | ||
size: 'sm', | ||
shape: 'rect', | ||
variant: 'default', | ||
type: 'solid', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters