0.0.3 • Published 2 years ago

@mrmntte/babel-plugin-stitches-inline v0.0.3

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

@mrmntte/babel-plugin-stitches-inline

const x = cx($button(), '~$bg=blue $font=bold $radius=100px', { '~$bg=orange': isHovered, })

input: css`$d=flex $bg=$red5 color=white` output: css({ $d: 'flex', $bg: '$red5', color: 'white' })()

input: css('$d=flex $bg=$red5 color=white') output: css({ $d: 'flex', $bg: '$red5', color: 'white' })

input: css({ '~$d=flex $bg=$red5 color=white': true, $shadow: '0 0 10px rgba(0,0,0,.5)', }) output: css({ $d: 'flex', $bg: '$red5', color: 'white', $shadow: '0 0 10px rgba(0,0,0,.5)', })

cx('~$p=100px', { '~$bg=orange': isHovered, '~$bg=$blue5': a + b === 10 }) output: cx( css({ $p: '100px' })(), isHovered ? css({ $bg: 'orange' })() : false, a + b === 10 ? css({ $bg: '$blue5' })() : false )