File tree Expand file tree Collapse file tree 2 files changed +59
-0
lines changed
Expand file tree Collapse file tree 2 files changed +59
-0
lines changed Original file line number Diff line number Diff line change 1+ import { style } from "@vanilla-extract/css" ;
2+ import { components } from "@/shared/styles/layer.css" ;
3+
4+ import { color } from "@/shared/styles/tokens/color.css" ;
5+ import { typographyVars } from "@/shared/styles/typography.css" ;
6+
7+ // 레이아웃
8+ export const keywordsRoot = style ( {
9+ "@layer" : {
10+ [ components ] : {
11+ display : "flex" ,
12+ flexWrap : "wrap" ,
13+ gap : "0.8rem" ,
14+ } ,
15+ } ,
16+ } ) ;
17+
18+ // 칩 하나
19+ export const keywordsChip = style ( {
20+ "@layer" : {
21+ [ components ] : {
22+ ...typographyVars . body3 ,
23+ display : "inline-flex" ,
24+ alignItems : "center" ,
25+ justifyContent : "center" ,
26+ height : "3.6rem" ,
27+ padding : "0.8rem 1.2rem" ,
28+ borderRadius : "1.8rem" ,
29+ border : `0.1rem solid ${ color . gray [ 200 ] } ` ,
30+ backgroundColor : color . white [ 100 ] ,
31+ color : color . gray [ 100 ] ,
32+
33+ boxSizing : "border-box" ,
34+ userSelect : "none" ,
35+ } ,
36+ } ,
37+ } ) ;
Original file line number Diff line number Diff line change 1+ import type { JSX } from "react" ;
2+ import * as styles from "./work-keywords.css" ;
3+
4+ export interface WorkKeyword {
5+ id : string ;
6+ label : string ;
7+ }
8+
9+ export interface WorkKeywordsProps {
10+ keywords : WorkKeyword [ ] ;
11+ }
12+ export function WorkKeywords ( { keywords } : WorkKeywordsProps ) : JSX . Element {
13+ return (
14+ < ul className = { styles . keywordsRoot } >
15+ { keywords . map ( ( { id, label } ) => (
16+ < li key = { id } className = { styles . keywordsChip } title = { label } >
17+ { label }
18+ </ li >
19+ ) ) }
20+ </ ul >
21+ ) ;
22+ }
You can’t perform that action at this time.
0 commit comments