redux-form-material-ui icon indicating copy to clipboard operation
redux-form-material-ui copied to clipboard

Discussion: Support for separate styles for warning messages

Open hluedeke opened this issue 7 years ago • 0 comments

I'm not sure how far this is going to fly since it's not really core to the library, but I've recently come across a use case where I have a TextField that has both a potential warning condition and an error condition (warning if the input is over a certain length, error if nothing is input at all).

The trouble I'm having is that I want to differentiate between the warning style and the error style (display the error message in red vs. the warning message in a deep yellow or orange). If both messages are displayed in red, I fear the user will not distinguish between the two severity levels.

Currently, I don't see a way to do this. I can set the errorStyle on the Field, but this would affect both warnings and errors. What I really want is a way to distinguish between them.

Would this be something that could be considered added to the library? Perhaps a warningStyle to accompany the errorStyle provided by material ui?

I'd be happy to help where I can.

Thanks!

hluedeke avatar Apr 24 '18 19:04 hluedeke