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(VNumberInput): support append/prepend inner slots/icons #20812

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions packages/vuetify/src/labs/VNumberInput/VNumberInput.sass
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,13 @@
&::-webkit-inner-spin-button
-webkit-appearance: none

.v-field
padding-inline-end: 0
padding-inline-start: 0
&:not(&--append-inner-slot)
.v-field
padding-inline-end: 0

&:not(&--prepend-inner-slot)
.v-field
padding-inline-start: 0

&--inset
.v-divider
Expand Down
4 changes: 3 additions & 1 deletion packages/vuetify/src/labs/VNumberInput/VNumberInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const makeVNumberInputProps = propsFactory({
default: 1,
},

...omit(makeVTextFieldProps({}), ['appendInnerIcon', 'modelValue', 'prependInnerIcon']),
...omit(makeVTextFieldProps({}), ['modelValue']),
}, 'VNumberInput')

export const VNumberInput = genericComponent<VNumberInputSlots>()({
Expand Down Expand Up @@ -328,6 +328,8 @@ export const VNumberInput = genericComponent<VNumberInputSlots>()({
'v-number-input',
{
'v-number-input--default': controlVariant.value === 'default',
'v-number-input--append-inner-slot': !!slots['append-inner'] || props.appendInnerIcon,
'v-number-input--prepend-inner-slot': !!slots['prepend-inner'] || props.prependInnerIcon,
'v-number-input--hide-input': props.hideInput,
'v-number-input--inset': props.inset,
'v-number-input--reverse': props.reverse,
Expand Down