style-injector-inline
v1.0.1
Published
``` > npm i --save style-injector-inline ```
Downloads
3
Readme
#How to use it
Installation
> npm i --save style-injector-inline
Usage
import toInjectable from 'style-injector-inline'
class App extends React.Component{
render(){
return <div>hellow world!</div>
}
}
export default toInjectable(App)
import App from 'example/App.js'
ReactDOM.render(<App inject={[{className:"*",style:{fontSize:20}}]}/>, document.getElementById('root'));
//result
/******************************************************
*
* <div>hellow world!
* <style>.app_[hash:5] *{font-size:20px}</style>
* </div>
*
******************************************************/