I have success with outline custom styling when variant="outlined"
and I use notchedOutline
in InputProps
.
Otherwise - variant=[anything else]
where only a bottom border exists - it doesn't work, even with underline
as the key/class in InputProps
.
I've even tried root
.
export default ({ boxType, classes, value, onChange, style }) => (
<TextField
variant={boxType || "standard"}
value={value}
onChange={onChange}
InputProps={{
classes: {
notchedOutline: classes.notchedOutline,
underline: classes.underline,
root: classes.TextInputField
},
style
}}
/>
)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…