FieldProps added in to Reforma
New feature! fieldProps
have been added to Reforma
Instead of doing classNames like this:
<Reforma>
<InputField className="field" name="first_name" />
<InputField className="field" name="middle_initial" />
<InputField className="field" name="last_name" />
</Reforma>
You can add a fieldProp
to automatically inject repeated properties into your field components like this:
<Reforma fieldProps={{ className: 'field' }}>
<InputField name="first_name" />
<InputField name="middle_initial" />
<InputField name="last_name" />
</Reforma>
Even if you add in a className prop on a specific element, Reforma will keep the className for that specific element
<Reforma fieldProps={{ className: 'field' }}>
<InputField className="highlight-red" name="first_name" />
<InputField name="middle_initial" />
<InputField name="last_name" />
</Reforma>
Happy coding!