You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I have to modify the library's source code to make it work, which I do not prefer.
Is there any way to make it work without modifying its source code? For example, reuse the existing className custom or injecting this.props.className into className by force?
By the way, this is the situation when I tried to add styles to react color, which only has a fixed className.
The text was updated successfully, but these errors were encountered:
I think the best thing is to open an issue there and ask if they can forward the className. Otherwise I can't think of a solution for this problem other than wrapping the Component in another one and applying the styles to the custom class.
Suppose I have a third-party react component that looks like this.
And I use it with styled-components like this.
Of course it didn't work. To make it work, the third-party library has to pass
this.props.className
toclassName
, like this:So I have to modify the library's source code to make it work, which I do not prefer.
Is there any way to make it work without modifying its source code? For example, reuse the existing className
custom
or injectingthis.props.className
intoclassName
by force?By the way, this is the situation when I tried to add styles to react color, which only has a fixed className.
The text was updated successfully, but these errors were encountered: