babel-plugin-styled-jss
This plugin created for styled-jss on top of PreJSS.
Install
npm install --save babel-plugin-styled-jss
Usage
.babelrc
plugin: 'styled-jss'
This plugin transforms
const Button = styledbutton` padding: 10; color: `
to
const Button =
And you can also use plain objects:
const Button = styled
Recognition
babel-plugin-styled-jss
can recognize this patterns:
// you can also use your custom names like:// import styledCustom from 'styled-jss' const Button = styled const scoped = const AnotherButton = scoped
And you can also use DI for example, but you need to name it as styled
:
{ const Button = styled}
Links
License
MIT