[joy-ui][Input] Should Input have a label prop?
Open
@siriwatknp is already working on this.
Since Sep 18, 2023.
discussion
on hold
package: joy-ui
scope: text field
- Dominant language
- JavaScript
- Stars
- 99.1k
- Forks
- 32.5k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 106
Description
Duplicates
- I have searched the existing issues
Latest version
- I have tested the latest version
Summary 💡
In my opinion, adding three extra lines of code and importing 2 more components seems like too much complexity for such a commonly-used and trivial use case:
<FormControl>
<FormLabel>Label</FormLabel>
<Input placeholder="Placeholder" />
<FormHelperText>This is a helper text.</FormHelperText>
</FormControl>
Wouldn't it be better to abstract this all away with a label and 'helperText' prop. like so:
<Input label="Label" helperText="This is a helper text."/>
I know the regular Mui library has this on TextField, so why not the JoyUI Input?
Examples 🌈
No response
Motivation 🔦
- reduce lines of code
- reduce imports
- increase simplicity of code
- more opinionated.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.