I have followed the example code for styling the underline color of a material-UI TextField
element.
http://www.material-ui.com/#/components/text-field
However when I try to add my own style, react cannot recognize this property.
<TextField type="number" id="Commission" label="Commission" underlineStyle={{borderColor : orange500}} fullWidth />
I get the following error message in the chrome developer console
warning.js:33 Warning: React does not recognize the `underlineStyle` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `underlinestyle` instead. If you accidentally passed it from a parent component, remove it from the DOM element.
in div (created by FormControl)
in FormControl (created by WithStyles(FormControl))
in WithStyles(FormControl) (created by TextField)
in TextField (created by Commissions)
in div (created by Commissions)
in div (created by Commissions)
in Commissions
in ReactPlaceholder (created by AsyncFunc)
in AsyncFunc (created by Route)
in Route (created by App)
in div (created by App)
in main (created by App)
in div (created by App)
in div (created by App)
in App (created by Connect(App))
in Connect(App) (created by Route)
in Route (created by RestrictedRoute)
in RestrictedRoute (created by App)
in div (created by App)
in IntlProvider (created by App)
in MuiThemeProvider (created by App)
in App (created by Connect(App))
in Connect(App) (created by Route)
in Route (created by MainApp)
in Switch (created by MainApp)
in Router (created by ConnectedRouter)
in ConnectedRouter (created by MainApp)
in Provider (created by MainApp)
in MainApp
npm view material-ui version 0.20.0
I have confirmed that this property exists on the TextField
element.
I am using the Jumbo React theme, and all of the underline colors of the Textfield
s default to purple.
Not sure why my custom style does not override the TextField
underline color.
underlineStyle={{borderColor : "orange500"}}
(with quotes)? – Abouliaimport {orange500, blue500} from 'material-ui/colors';
– Algolagniamaterial-ui/styles/colors
notmaterial-ui/colors
– Poniard