babel-plugin-react-css-modules
babel-plugin-react-css-modules copied to clipboard
Support inline CSS imports
It has been requested to support inline CSS imports.
https://github.com/4Catalyzer/css-literal-loader
To illustrate a use case:
css`
.primary {
color: black;
border: 1px solid black;
background-color: white;
}
`;
<button styleName='primary'></button>;
Wow this would be incredible. I love css modules but I don't like the idea of creating another file and creating directories for it... but I still want all of the other benefits like styleName, not using inline CSS styles, not using object literals, etc.
Interesting, I didn't realise that there would be a demand for this. I will take a look into feasibility of this over the weekend.