You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I propose that we create a TextField component, which renders this:
<Field><TextInput/><ErrorsBlock/></Field>
The props will be a combination of the props for all of those components it renders. It will get Field, TextInput, and ErrorsBlock from its components prop (components context).
For those familiar with autoform, this is similar to the quickField idea in that package.
There are 4 good reasons to make this and use it:
Faster development, less to type
UI consistency, there will be less variation in how each developer makes a field.
Client bundle size. If making these blocks dynamically, there is less code to send down to the client.
This component can handle making unique IDs to properly implement htmlFor on the label.
I think this should be limited to TextInput. We can duplicate it to make similar PhoneNumberField, NumberField, SelectField, etc.
The text was updated successfully, but these errors were encountered:
TextField
I propose that we create a TextField component, which renders this:
The props will be a combination of the props for all of those components it renders. It will get
Field
,TextInput
, andErrorsBlock
from itscomponents
prop (components context).For those familiar with autoform, this is similar to the quickField idea in that package.
There are 4 good reasons to make this and use it:
htmlFor
on the label.I think this should be limited to
TextInput
. We can duplicate it to make similarPhoneNumberField
,NumberField
,SelectField
, etc.The text was updated successfully, but these errors were encountered: