I'm currently working on a React component named Comp1
and I've included a CSS file within it like so:
import "./style.css";
Within the style.css
file, I'm using the following line:
@import "https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="5d3f3232292e292f3c2d1d68736c736e">[email protected]</a>/dist/css/bootstrap.min.css";
However, the issue I'm facing is that this applies the CSS globally to all React components, causing conflicts. I want to restrict this styling to just the specific component Comp1
, and specifically apply it within the tag:
<div className="comp1">
</div>
Could you please advise me on how to achieve this? Let me know if you require any further information.