Skip to content

Calvin92/react-style-object-to-css

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
 
 
 
 
 
 
 
 

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