@cryptic-css/support-styled-components
This package will add CCSS support for styled-components.
Install
npm i @cryptic-css/support-styled-components
Usage
Import at the very top level of your application, where you haven't used any styled-component yet. You just need to do this once, than just use styled-components as before.
import '@cryptic-css/support-styled-components'
StyleObject method
const Header = styled.header({
d: 'f'
})
Mix props with template literals
const Header = styled.header`
background: #000;
`
render(<Header ta="c" />)
css
prop
Using the Currently there is no way to intercept the css
function calls so the css
prop is not supported yet.
The only way to use CCSS is to have a direct ccss
call:
<div css={ccss({ m: 0 })} />