App.js
import React, { Component } from 'react';import CSSModules from 'react-css-modules';
import styles from './App.module.css';
class App extends Component {
render() {
return (
<div styleName="name">
xu
</div>
);
}
}
export default CSSModules(App, styles);
App.module.css
.name { padding: 20px;
font-size: 24px;
color: red;
}
还没有评论,来说两句吧...