theme.typography.caption and theme.typography.body1 should be used for styling InputLabel (the first or the second depending on shrink).
Defining theme.typography.caption.letterSpacing = '0.04em' doesn't show any effect on a <TextField InputLabelProps={{ shrink: true }} label="Some label" />.
https://codesandbox.io/s/l78x53665l
letterSpacing: '0.04em' for 'caption'InputLabelProps={{ shrink = true }}
I'm trying to adapt material-ui to how my app looked before it.
| Tech | Version |
|--------------|---------|
| Material-UI | 1.0.0-beta.36 |
| React | 16.2.0 |
| browser | Google Chrome 64.0.3282.119 |
theme.typography.caption and theme.typography.body1 should be used for styling InputLabel (the first or the second depending on shrink).
@gustavopch I don't think that we can do that. First, we are transitioning the input label with the scale property. We will lose this capability. Then the specification doesn't ask for body1:
But more importantly, I'm not sure that sharing code between the two concepts is wise. I can create unexpected side effects. Instead, you can do the following:
const theme = createMuiTheme({
typography: {
body1: {
letterSpacing: "0.4em"
},
caption: {
letterSpacing: "0.4em"
}
},
overrides: {
MuiFormLabel: {
root: {
letterSpacing: "0.4em"
}
}
}
});
@oliviertassinari Thank you. Your suggestion will do it.
Most helpful comment
@gustavopch I don't think that we can do that. First, we are transitioning the input label with the scale property. We will lose this capability. Then the specification doesn't ask for body1:
But more importantly, I'm not sure that sharing code between the two concepts is wise. I can create unexpected side effects. Instead, you can do the following:
https://codesandbox.io/s/68kly0oww
