Slide 9
Slide 9 text
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import from
export const
{ style } ;
redButton ({
backgroundColor ,
color ,
padding ,
borderRadius ,
border ,
cursor ,
selectors {
{
backgroundColor ,
},
},
});
'@vanilla-extract/css'
'#ef4444'
'white'
'0.5rem 1rem'
'0.375rem'
'none'
'pointer'
'#dc2626'
=
:
:
:
:
:
:
:
:
:
style
'&:hover'
Click Me
1
2
3
4
5
6
import as from './styles.css.ts'
styles
className styles redButton
Click Me
*
button
button
;
< ={ . }>
型!型!型!
学習コストはあるけど、所詮はCSS
ビルド時に.cssファイルとして出力
スケーラブルな設計
Vanilla-extract
比べてみよう