Is there a way to locally override an external module's CSS class for a specific component?
Here is my current code:
import `style` from './style.module.css' // local CSS module
import `ExternalComponent` from 'ExternalComponent' // external module being used
function Component(){
return(
<ExternalComponent/>
)
}
The ExternalComponent
renders a div
element with a class of parent
. How can I override the parent
class of ExternalComponent
in my locally imported style
module so that the style only changes for this component and does not affect other instances where it is used?
I am using React, by the way.