Skip to content

Commit

Permalink
refactor(VOtpInput): use flex gap for internal item spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
johnleider committed Oct 4, 2023
1 parent afd6a58 commit 403aaaa
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/vuetify/src/labs/VOtpInput/VOtpInput.sass
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@
align-items: center
display: flex
justify-content: center
padding: .5rem
padding: $otp-input-padding
position: relative

.v-field
height: 100%
margin: 0 .25rem

.v-otp-input__divider
margin: 0 8px

.v-otp-input__content
align-items: center
display: flex
gap: $otp-input-content-gap
height: 64px
padding: .5rem
padding: $otp-input-content-padding
justify-content: center
max-width: 320px
position: relative
Expand Down
2 changes: 2 additions & 0 deletions packages/vuetify/src/labs/VOtpInput/VOtpInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export type VOtpInputSlots = {
export const makeVOtpInputProps = propsFactory({
autofocus: Boolean,
divider: String,
fluid: Boolean,
focusAll: Boolean,
label: {
type: String,
Expand Down Expand Up @@ -213,6 +214,7 @@ export const VOtpInput = genericComponent<VOtpInputSlots>()({
'v-otp-input',
{
'v-otp-input--divided': !!props.divider,
'v-otp-input--fluid': props.fluid,
},
props.class,
]}
Expand Down
4 changes: 4 additions & 0 deletions packages/vuetify/src/labs/VOtpInput/_variables.scss
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
@use '../../styles/settings';
@use '../../styles/tools';

$otp-input-content-gap: .5rem !default;
$otp-input-content-padding: .5rem 0 !default;
$otp-input-padding: .5rem 0 !default;

0 comments on commit 403aaaa

Please sign in to comment.