Skip to content

MunGell/react-postcss

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.