我有2个相同的组件,样式有点不同,所以我想重用常用样式,但不想为它们使用全局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})