react-style-object-to-css
Version:
Convert react style with object to inline css(string).
20 lines (16 loc) • 378 B
Markdown
# Summary
Convert React style defined as an object to pure inline css (string).
# Installation
```js
npm install react-style-object-to-css
```
# Example
```js
const reactToCSS = require('react-style-object-to-css')
const styleObj = {
backgroundColor: 'blue',
fontSize: 14
}
// result === "background-color: blue; font-size: 14px;"
const result = reactToCSS(styleObj)
```