vuetify
vuetify copied to clipboard
feat(VOtpInput): Add support for style props
Add support for style props like filled, solo, and rounded.
Description
I used VTextField code as reference to add support for style props. This my first time contributing to the codebase, but testing the props in Playground showed that they work as expected (almost!)
The current implementation of VOtpInput uses outlined style by default, which is not consistent with the other input fields. This becomes an issue when using any styled props like solo, because the border of the outlined style persists and doesn't go away.
I found that making the component consistent with the rest of the input components will introduce breaking changes, so I decided to do that in another PR.
Upon merging this PR, style props like solo will work on VOtpInput, however the visually it will not be identical of solo effect in other input components because of the current implementation of VOtpInput.
Motivation and Context
Fixes #15299
How Has This Been Tested?
I am not familiar with unit tests, and though I added none. I just changed the code and saw the wanted behavior reflected in the Playground.
Markup:
<v-container>
<v-otp-input length="4" solo />
</v-container>
Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Improvement/refactoring (non-breaking change that doesn't add any features but makes things better)
Checklist:
- [x] The PR title is no longer than 64 characters.
- [ ] The PR is submitted to the correct branch (
masterfor bug fixes and documentation updates,devfor new features and backwards compatible changes andnextfor non-backwards compatible changes). - [x] My code follows the code style of this project.
- [ ] I've added relevant changes to the documentation (applies to new features and breaking changes in core library)