Skip to content

Converts plain CSS into (optionally auto-prefixed) React-style properties map.

License

Notifications You must be signed in to change notification settings

elierotenberg/react-css

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-css

Converts plain CSS into (optionally auto-prefixed) React-style properties map.

Usage

/** @jsx React.DOM */
var React = require("react");
var fromCSS = require("react-css").fromCSS;

/* Pre-compute the CSS to avoid lengthy calculations at each render cycle */
var myComponentStyle = fromCSS("{ opacity: 0.5; }");

var MyComponent = React.createClass({
	render: function() {
		return (
			<div style={myComponentStyle}>
				/* ... */
			</div>
		);
	},
});
/* ... */

About

Converts plain CSS into (optionally auto-prefixed) React-style properties map.

Resources

License

Stars

Watchers

Forks

Packages

No packages published