Reputation: 143
I'm using material ui TextField
I want to change style of the part that I mentioned in text field (see image)
or
font of the text that user writes
I've tried to use material API but it shows same result
const useStyles = makeStyles((theme) => ({
root: {
"&. input":{
fontFamily:'roboto'
}
)
}
Upvotes: 0
Views: 305
Reputation: 34117
For MUI TextField try this
<TextField inputProps={{ style: { 'fontFamily' : 'roboto'} }} id="standard-basic" label="Standard" />
OR
const useStyles = makeStyles((theme) => ({
root: { fontFamily: 'roboto' }
}));
<TextField classes={{ input: classes.root }} id="standard-basic" label="Standard" />
Either one of these should work.
Upvotes: 1