Send Variable to withStyles in Material UI?
问题 I have the following: class StyledInput extends React.Component{ styles = (color, theme) => ({ underline: { borderBottom: `2px solid ${color}`, '&:after': { borderBottom: `2px solid ${color}`, } } }) div = props => ( <TextField placeholder="temp input" InputProps={{ classes:{ root: props.classes.underline }, style:{ height: '1.5rem', fontSize:'1rem', marginTop: '-1rem', } }} > <div> {props.children} </div> </TextField> ) Styled = withStyles(this.styles('white'))(this.div) render(){ return(