Skip to content

Commit 403aaaa

Browse files
committed
refactor(VOtpInput): use flex gap for internal item spacing
1 parent afd6a58 commit 403aaaa

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

packages/vuetify/src/labs/VOtpInput/VOtpInput.sass

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@
99
align-items: center
1010
display: flex
1111
justify-content: center
12-
padding: .5rem
12+
padding: $otp-input-padding
1313
position: relative
1414

1515
.v-field
1616
height: 100%
17-
margin: 0 .25rem
1817

1918
.v-otp-input__divider
2019
margin: 0 8px
2120

2221
.v-otp-input__content
2322
align-items: center
2423
display: flex
24+
gap: $otp-input-content-gap
2525
height: 64px
26-
padding: .5rem
26+
padding: $otp-input-content-padding
2727
justify-content: center
2828
max-width: 320px
2929
position: relative

packages/vuetify/src/labs/VOtpInput/VOtpInput.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export type VOtpInputSlots = {
2929
export const makeVOtpInputProps = propsFactory({
3030
autofocus: Boolean,
3131
divider: String,
32+
fluid: Boolean,
3233
focusAll: Boolean,
3334
label: {
3435
type: String,
@@ -213,6 +214,7 @@ export const VOtpInput = genericComponent<VOtpInputSlots>()({
213214
'v-otp-input',
214215
{
215216
'v-otp-input--divided': !!props.divider,
217+
'v-otp-input--fluid': props.fluid,
216218
},
217219
props.class,
218220
]}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
@use '../../styles/settings';
22
@use '../../styles/tools';
3+
4+
$otp-input-content-gap: .5rem !default;
5+
$otp-input-content-padding: .5rem 0 !default;
6+
$otp-input-padding: .5rem 0 !default;

0 commit comments

Comments
 (0)