如何将CSS模块类名称作为与styleName
不同的支柱传递?
import './MyStyles.css'
<ThirdPartyComponent
styleName='this-works'
activeClassName='i want to pass my css module classes here' />
答案 0 :(得分:3)
import styles from './MyStyles.css'
<ThirdPartyComponent
className={styles['this-works']}
activeClassName={styles['my-css-module-class-name']}
/>