用于 React 组件的 CSS 构造器
Every React component gets an inbuilt javascript constructor for functional logic.
Introducing the css constructor for styling!
…--
Other features
Uses classes instead of inline styles
Editable in developer tools
Super tiny: only 1.2K gzipped!
Official library emoji
Coming soon
server side rendering
--
npm install css-constructor --save
import css from 'css-constructor'
Add a @css block just before the render function (important)
Add transform-decorators-legacy as the first plugin in your .babelrc (already downloaded with ).
If you are not familiar with babel plugins you can follow the detailed instructions here.
Or, if you would prefer using without adding the babel transform for decorators, up-vote this issue.
--
uses ES7 class method decorators on the render function. Detailed post coming soon.
Heavily inspired from glamor, styled-components and radium
Special thanks to thysultan. stylis is the bomb!
⭐️ this repo!
暂无开放 Issues,或尚未同步最近议题。