Skip to content

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

License

Notifications You must be signed in to change notification settings

Calvin92/react-style-object-to-css

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published