Slide 26
Slide 26 text
CSS in JS: Example
13
1. Why “CSS in JS”
1.1 Power of “CSS in JS”
apperance
backgroundColor
border
borderRadius
color
fontWeight
padding
textTransform
'@emotion/react'
'none'
'var(--theme)'
'none'
4
'var(--blackish)'
900
'8px 16px'
'uppercase'
{ CSSObject, jsx }
style: CSSObject = {
: ,
: ,
: ,
: ,
: ,
: ,
: ,
: ,
}
import from
const
/** @jsx jsx */
button
span span
button
fontSize
css
css
16
{style}
{styleText}
styleText: CSSObject = {
: ,
}
Button = () => (
< = >
< = >Hello >
>
)
const
export const