styleOverrides on custom components #163
Unanswered
simplecommerce
asked this question in
Q&A
Replies: 1 comment 2 replies
-
hi @simplecommerce, |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am using this library with MUI v5 and I was wondering how do I achieve the following?
I have a component like this:
With this sample, I am able to put this in my theme.
My question is the following, In some cases, I need to override the styles from inside a component.
So for example:
I was wondering if something like this is possible at all?
Before migrating to v5 and using tss, I used to to it by adding a mapValues of the classes generated by the component in order to generate a
MyComponent-root
style with no random keys so that we could target it by doing"& .MyComponent-root": {}
But since I removed this option it no longer works to target the style like this and I thought maybe there was a better option.
I hope I am clear in my question, any help is appreciated, thanks!
Beta Was this translation helpful? Give feedback.
All reactions