Skip to content

Add innerClassName prop to Form.Field #261

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

Merged
merged 2 commits into from
Jun 30, 2020
Merged

Conversation

vine77
Copy link
Contributor

@vine77 vine77 commented Jun 29, 2020

The className gets applied to the wrapping div, so adding an innerClassName allows us to target the inner form field element.

Note: This is a prerequisite for PN-1002

@vine77 vine77 requested a review from a team as a code owner June 29, 2020 17:29
@vine77 vine77 force-pushed the tasks/add-formfield-class branch from f43adc0 to c629c88 Compare June 29, 2020 18:04
Copy link
Contributor

@nmuldavin nmuldavin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. The only consideration is that it technically makes it required that Form input component implementations correctly handle a className prop as part of the interface described here: https://puppet.style/#/React%20Components/FormField

I think this should be the case already with all of our implementations

@vine77
Copy link
Contributor Author

vine77 commented Jun 29, 2020

It looks like I need to update a test: <FormField /> applies the appropriate props to the inner input element.

@vine77 vine77 merged commit a485f5b into development Jun 30, 2020
@vine77 vine77 deleted the tasks/add-formfield-class branch June 30, 2020 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants