Trying to use React to style elements generated by a third-party library has been a challenge. In the snippet below, I was able to achieve the desired styling using CSS, but now I am looking to accomplish the same using JavaScript. This way, users can define their own custom color schemes.
.ThirdPartyDiv {
color: red;
}
<div class="MyDiv">
<div class="ThirdPartyDiv">
Some Content
</div>
</div>
When I say "user defined," I mean that users will specify values for color1, color2, color3, etc.
These values will be saved in a database. Then, when the site loads on a given page, we can retrieve this information and create a stylesheet based on it.