Skip to content

Commit

Permalink
feat(VNumberInput): support append/prepend inner slots/icons
Browse files Browse the repository at this point in the history
  • Loading branch information
yuwu9145 committed Dec 27, 2024
1 parent 8cb5dab commit 2738654
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
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

0 comments on commit 2738654

Please # to comment.