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

Allow Label to use value & children #173

Closed
rluders opened this issue Jun 2, 2022 · 0 comments · Fixed by #207
Closed

Allow Label to use value & children #173

rluders opened this issue Jun 2, 2022 · 0 comments · Fixed by #207
Assignees
Labels
good first issue Good for newcomers 🚀 enhancement New feature or request

Comments

@rluders
Copy link
Collaborator

rluders commented Jun 2, 2022

I would like to use Label component as self-closing tags, to reduce my code verbosity.

Describe the solution you'd like
Label should accept both formats:

<Label htmlFor="name" value="Your name" />

and

<Label htmlFor="name">Your name</Label>

Describe alternatives you've considered
n/a

Additional context
n/a

@rluders rluders added 🚀 enhancement New feature or request good first issue Good for newcomers labels Jun 2, 2022
@rluders rluders moved this from Backlog to Todo in Flowbite React Development Jun 2, 2022
@rluders rluders added this to the v1.0.0-alpha milestone Jun 2, 2022
@tulup-conner tulup-conner self-assigned this Jun 6, 2022
tulup-conner added a commit to tulup-conner/flowbite-react that referenced this issue Jun 6, 2022
…rg#173

Instead of relying on`children`, allow the use of
prop `value`.
@rluders rluders linked a pull request Jun 8, 2022 that will close this issue
2 tasks
rluders pushed a commit that referenced this issue Jun 8, 2022
* feat(component): Allow `Label` as self-closing tag, resolves #173

Instead of relying on`children`, allow the use of
prop `value`.

* test(component): Add unit test for `<Label value="">`
Repository owner moved this from Todo to Done in Flowbite React Development Jun 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers 🚀 enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants