how to remove green color from input field in react?

how to remove green color from input field in react?



Could you please tell me how to remove green color from input field in react? I know it is coming from the theme, I just want to remove from only for this form input and select field.


input


select



Codesandbox



enter image description here


const theme = createMuiTheme(
palette:
primary: green,
secondary: green
,
overrides:
MuiInput:
underline:
color: "red",
"&:hover:not($disabled):after": ,
"&:hover:not($disabled):before":



);





material-ui.com/api/input-label you have to override the styles.
– Yatrix
Sep 5 '18 at 1:13





can you please change my sandbox link
– user944513
Sep 5 '18 at 1:17





any update ? can you help me
– user944513
Sep 5 '18 at 1:34





I don't know how to do that offhand as I'm not familiar with the library. I gave you the link for direction. Sorry I couldn't be more helpful.
– Yatrix
Sep 5 '18 at 1:43





ok..thanks for help
– user944513
Sep 5 '18 at 1:43




1 Answer
1



I have forked your code example and edited in the theme overrides to change the color of the form label https://codesandbox.io/s/j3763x65y3.



In the test.js file, i have edited in the following:


test.js



under styles:


noUnderline:
color: "grey",
"&:after":
borderColor: "grey",
color: "grey"
,



and as properties for the respective TextField:


<TextField
InputLabelProps=
shrink: true,
focused: false

InputProps=
classes:
focused: classes.noUnderline,
underline: classes.noUnderline


</TextField>



I did not quickly find the right classes property to change the focused color of the InputLabel, so I just disabled the focus with focused: false, although this is not a very elegant solution and I would not use it in production.


focused: false



Since the TextField component is a component composed from other components, check out the API docs for the component https://material-ui.com/api/text-field/ as well as for the components it is composed of.



Thanks for contributing an answer to Stack Overflow!



But avoid



To learn more, see our tips on writing great answers.



Some of your past answers have not been well-received, and you're in danger of being blocked from answering.



Please pay close attention to the following guidance:



But avoid



To learn more, see our tips on writing great answers.



Required, but never shown



Required, but never shown




By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Crossroads (UK TV series)

ữḛḳṊẴ ẋ,Ẩṙ,ỹḛẪẠứụỿṞṦ,Ṉẍừ,ứ Ị,Ḵ,ṏ ṇỪḎḰṰọửḊ ṾḨḮữẑỶṑỗḮṣṉẃ Ữẩụ,ṓ,ḹẕḪḫỞṿḭ ỒṱṨẁṋṜ ḅẈ ṉ ứṀḱṑỒḵ,ḏ,ḊḖỹẊ Ẻḷổ,ṥ ẔḲẪụḣể Ṱ ḭỏựẶ Ồ Ṩ,ẂḿṡḾồ ỗṗṡịṞẤḵṽẃ ṸḒẄẘ,ủẞẵṦṟầṓế