Skip to content

Commit

Permalink
refactor(VDatePicker): move width logic from style to class
Browse files Browse the repository at this point in the history
  • Loading branch information
johnleider committed Nov 14, 2023
1 parent 6ec97a7 commit 448369b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/vuetify/src/components/VDatePicker/VDatePicker.sass
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@

.v-date-picker
overflow: hidden
width: 360px

&--show-week
width: 408px

.v-date-picker-month
padding: 0 12px 12px
Expand Down
4 changes: 3 additions & 1 deletion packages/vuetify/src/components/VDatePicker/VDatePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,12 @@ export const VDatePicker = genericComponent<new <T, Multiple extends boolean = f
class={[
'v-date-picker',
`v-date-picker--${viewMode.value}`,
{
'v-date-picker--show-week': props.showWeek,
},
props.class,
]}
style={ props.style }
width={ props.width ?? (props.showWeek ? 408 : 360) }
v-slots={{
title: () => slots.title?.() ?? (
<div class="v-date-picker__title">
Expand Down

0 comments on commit 448369b

Please sign in to comment.