Converts plain CSS into (optionally auto-prefixed) React-style properties map.
JavaScript
Latest commit 6dae342 Aug 2, 2014 Elie Rotenberg Bumped npm to v0.0.2
Permalink
Failed to load latest commit information.
tests
.gitignore First commit. Aug 1, 2014
LICENSE
README.md
fromCSS.js
index.js First commit. Aug 1, 2014
package.json Bumped npm to v0.0.2 Aug 2, 2014

README.md

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>
        );
    },
});
/* ... */