Skip to content
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

The Big Input Refactor #212

Open
rin opened this issue May 30, 2020 · 0 comments
Open

The Big Input Refactor #212

rin opened this issue May 30, 2020 · 0 comments

Comments

@rin
Copy link
Contributor

rin commented May 30, 2020

Every input should …

  • use the validation HOC (and use the corresponding props, and tests checking for it)
  • have className and containerClassname (and a test checking for it)
  • onChangeFunction (and probably a test checking for it …?)
  • required prop and a visual indicator for it (and a test checking for it)
  • 'autoFocus' (and a test checking for it)
  • props and styles for 'disabled' and 'readOnly' (and a test checking for them!)
  1. Hopefully, there's something like shared examples, so we can abstract the tests for the validations, and the standard props.
  2. Make sure we don't trigger any warnings by passing props that aren't valid HTML attributes to the HTML elements
  3. Abstract props every input should have into defaultInputPropTypes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant