Show CSS API like https://material-ui.com/api/input-label/#css
CSS API missing
https://material-ui.com/api/text-field/#css
I wanted to look up how to pass down a class to the helper Text
Online Documentation
| Tech | Version |
|--------------|---------|
| Material-UI | v4.2.0 |
This component doesn't inject any styles. The simplest strategy is to open the dev tools, and to pick the global class name.
OK then, but shouldn't we at least say that in the docs then? I was passing stuff to classes and got the error "Only root is available" - so should we then at least list that under CSS API?
On the other hand it would be great if you _could_ pass down classes.
My workaround is now passing a class down to classes={{ root: classes.helperText }} and then having
helperText: {
'& p': {
//my overwrites here
}
},
Oh, I was wrong. Thanks for raising that the root key was working. I had forgotten that we introduced it for global theme overrides.
https://github.com/mui-org/material-ui/blob/22ba481fd549ffd35199846d2c313881406256a4/packages/material-ui/src/TextField/TextField.js#L21
Ok, in this case, I think that we should export the style const so the API generator can pick it up:
-const styles = {
+export const styles = {
I got this one 馃憤
Most helpful comment
I got this one 馃憤