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

feat(react): deprecate "children" for adding input/textarea label #622

Merged
merged 4 commits into from
Apr 29, 2021

Conversation

josokinas
Copy link
Contributor

@josokinas josokinas commented Apr 28, 2021

Purpose

Using "children" prop to display a label on React's Input and Textarea is not very accurate, because "children" on Textarea has another meaning, also e.g. for Select component this also will not work - options will need to be provided via children instead.

Approach

Deprecate usage of "children" prop on Input and Textarea components, suggest component composition instead.

Testing

N/A

Risks

N/A

@josokinas josokinas self-assigned this Apr 28, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Apr 28, 2021

🎊 PR Preview d1185d7 has been successfully built and deployed to https://onfido-castor-preview-pr-622.surge.sh

🕐 Build time: 156.002s

🤖 By surge-preview

…"children"

When using Input or Textarea component, use "label" prop to provide a 
label instead of previously
"children" one used.
@josokinas josokinas force-pushed the feat/input-textarea-label branch from 5eaee3f to 56dc00b Compare April 28, 2021 13:16
@josokinas josokinas requested a review from rabelloo April 28, 2021 13:17
Co-Authored-By: Andre Luiz Rabello <andre.luiz_r@hotmail.com>
@josokinas josokinas force-pushed the feat/input-textarea-label branch from 879a435 to c2c58cb Compare April 28, 2021 15:37
@josokinas josokinas changed the title feat(react): add "label" input/textarea prop, deprecate "children" feat(react): deprecate "children" for adding input/textarea label Apr 29, 2021
@josokinas josokinas requested a review from rabelloo April 29, 2021 10:47
@josokinas josokinas merged commit 359b5a2 into main Apr 29, 2021
@josokinas josokinas deleted the feat/input-textarea-label branch April 29, 2021 13:26
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