Input improvements #640
Closed
niikeec
started this conversation in
Feature Request
Replies: 1 comment
-
Form FieldsOur Form stuff is based on a blog post of mine, in which I detail adding labels and errors to the wrapper
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Opened a discussion related to #633
Initially, I wanted to add the label and error to the FormField, which is a great idea since adding new form field types would be easy. One issue that arises is that to style the field accordingly to the error (red border, ring, ...) you would have to pass the error down to the root Input through context or by getting the field state from the form's context in the form Input component. Labels and errors would also be limited to form fields only. I don't mind if that's a preferred design choice. It has its positives and negatives, would love to hear your opinion.
When it comes to className props, they aren't really required besides the outerClassName, but you are limiting yourself to one style, now ofc that's not an issue if you know that the style shouldn't/won't change.
Beta Was this translation helpful? Give feedback.
All reactions