style-injector-inline

1.0.1 • Public • Published

#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>
 *
 ******************************************************/

Readme

Keywords

none

Package Sidebar

Install

npm i style-injector-inline

Weekly Downloads

0

Version

1.0.1

License

ISC

Unpacked Size

4.84 kB

Total Files

3

Last publish

Collaborators

  • lojoso