我想在css
本地覆盖组件的外部模块类
In my code
import `style` from './style.module.css' // this is local css module
import `ExternalComponent` from 'ExternalComponent' // suppose this is external module i'm using
function Component(){
return(
<ExternalComponent/>
)
}
现在ExternalComponent
渲染一个div
带有 class 的元素parent
。因此,如果我正在导入
ExternalComponent
如何覆盖本地导入模块中的parent
类,以便仅针对此组件更改样式,而我使用它的其他位置不会更改。ExternalComponent
style
ExternalComponent
顺便说一句,我正在使用反应。