npm.io
1.1.2 • Published 8 years ago

react-style-object-to-css

Licence
MIT
Version
1.1.2
Deps
0
Size
7 kB
Vulns
0
Weekly
0
Stars
23

Summary

Convert React style defined as an object to pure inline css (string).

Installation

	npm install react-style-object-to-css

Example

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)

Keywords