-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(text-input): add warn prop #5918
feat(text-input): add warn prop #5918
Conversation
Deploy preview for carbon-elements ready! Built with commit 1d52468 |
Deploy preview for carbon-components-react ready! Built with commit 1d52468 https://deploy-preview-5918--carbon-components-react.netlify.app |
The warning text color should match the label color and use Also a good thing to note is we are planning on moving the helper text to be under the input instead of under the label so this will override any helper text that is there as well. |
@aagonzales Thanks for the heads-up. The helper text update will be included in #5867 it seems. So I’ll make sure to update the warning text logic accordingly once that is merged 👍 |
Makes sense to me! |
I think the only thing blocking this then would be #5919. Once that is fixed, I can update the snapshot and this should be pretty much good to go. Support for the other inputs could then be added one by one in new PRs to keep them small and manageable. |
… into warning-input
@andreancardona @rjhenriquez let me know if you all have questions around this PR / review process! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@janhassel looks awesome! 🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Looks awesome!!
Related issue: #6492
This is a draft PR with a sample implementation of a warning state for the TextInput component to start a conversation around the technical side of things.
@aagonzales Right now, the icon is still the round warning icon. I haven't been able to change it yet, since the triangle one doesn't have a separate inner path to color the exclamation mark. I'll open an issue for it shortly.
@joshblack I'd love your input about the implementation and if this would be the right way to go. Also, for accessibility: I believe
aria-invalid
shouldn't be emitted since it could lead to confusion for users that rely on screen readers, would you agree?