File tree Expand file tree Collapse file tree 2 files changed +63
-0
lines changed
Expand file tree Collapse file tree 2 files changed +63
-0
lines changed Original file line number Diff line number Diff line change 2525 fill : var (--color-gray500 );
2626 }
2727}
28+
29+ .TagStory {
30+ display : flex ;
31+ flex-direction : column ;
32+ gap : 1rem ;
33+
34+ .Wrapper {
35+ display : flex ;
36+ gap : 1rem ;
37+ justify-content : center ;
38+ align-items : center ;
39+ width : 300px ;
40+ }
41+
42+ .Text {
43+ font-size : 1.125rem ;
44+ width : 120px ;
45+ }
46+ }
Original file line number Diff line number Diff line change 1+ import Tag from "@/components/ui/Tag/Tag" ;
2+ import styles from "@/components/ui/Tag/Tag.module.scss" ;
3+ import type { TagProps } from "@/components/ui/Tag/Tag.types" ;
4+
5+ import type { Meta , StoryObj } from "@storybook/react" ;
6+
7+ const meta : Meta < typeof Tag > = {
8+ title : "Example/Tag" ,
9+ component : Tag ,
10+ parameters : {
11+ layout : "centered" ,
12+ } ,
13+ tags : [ "!autodocs" ] ,
14+ } ;
15+
16+ export default meta ;
17+
18+ export const Primary : StoryObj < TagProps > = {
19+ args : {
20+ text : "태그" ,
21+ variant : "primary" ,
22+ isSelect : false ,
23+ } ,
24+ } ;
25+
26+ export const VariantProps : StoryObj < typeof Tag > = {
27+ render : ( ) => (
28+ < div className = { styles . TagStory } >
29+ < div className = { styles . Wrapper } >
30+ < p className = { styles . Text } > primary</ p >
31+ < Tag variant = "primary" text = "primary" />
32+ </ div >
33+ < div className = { styles . Wrapper } >
34+ < p className = { styles . Text } > add</ p >
35+
36+ < Tag variant = "add" text = "add" />
37+ </ div >
38+ < div className = { styles . Wrapper } >
39+ < p className = { styles . Text } > isSelect</ p >
40+ < Tag variant = "primary" text = "isSelect" isSelect />
41+ </ div >
42+ </ div >
43+ ) ,
44+ } ;
You can’t perform that action at this time.
0 commit comments