1
我有兩個相同的組件,這些組件在樣式上有點不同,所以我想重用常見的樣式,但不會使用gloval css for他們,我該如何實現它?反應css模塊的幾個css文件
import React from 'react';
import commonStylesfrom '../common/table.css';
import styles from '../uniquesStyles.css';
export default class Table extends React.Component {
render() {
return <div styleName='table'>
<div styleName='something-diffrent'>
<div styleName='cell'>A0</div>
<div styleName='cell'>B0</div>
</div>
</div>;
}
}
//how can i combine 2 files here
export default CssMudule(Table, {styles, commonStyles})