|
|
|
|
|
by haukur
3670 days ago
|
|
You write CSS files and import them in your component. By using Webpack you would do something like this in your component: import CSSModules from 'react-css-modules';
import styles from './styles'; // This is a styles.css file in the same dir
const Component = () => <p styleName="welcome">Hello, world!</p>;
export default CSSModules(Component, styles);
The stylesheet import is just Webpack doing its thing, using css-loader. Example config: https://github.com/hph/kit/blob/master/webpack.config.jsSorry if I misunderstood your question. |
|