1.0.0 • Published 3 years ago

babel-plugin-css-to-inline-styles v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

babel-plugin-css-to-inline-styles

Installation

npm install --save babel-plugin-css-to-inline-styles

Example

Given an example css file (test.css)

.main-wrapper {
    flex-direction: row;
    display: flex;
    flex: 1;
  }

app.jsx

const ReactComponent = <div className="main-wrapper"></div>

transforms to

const ReactComponent = <div style={{
                                    flexDirection: 'row',
                                    display: 'flex',
                                    flex: 1;
                                    }}>
                        </div>

Need help or want to donate to help me make Open Source projects?