react-postcss

0.1.0 • Public • Published

react-postcss

Build Status

This repository contains proof-of-concept simple style tag component for React.

How to use

style: function() {
    return `
        .Container {
            &__button {
                color: red;
                background-color: black;
            }
        }
    `;
},
 
render: function () {
    return (
        <div className="Container">
            <Style plugins={[postcssNested, autoprefixer]}>{this.style()}</Style>
            <button className="Container__button">
                Button
            </button>
        </div>
    )
}

PostCSS

This component uses PostCSS. You can use any plugins from postcss.parts website.

/react-postcss/

    Package Sidebar

    Install

    npm i react-postcss

    Weekly Downloads

    0

    Version

    0.1.0

    License

    MIT

    Last publish

    Collaborators

    • sgazanchyan