fix(calendar): stretch year months grid to full viewport height
This commit is contained in:
@@ -170,7 +170,10 @@ defineProps<{
|
|||||||
:style="calendarSceneTransformStyle"
|
:style="calendarSceneTransformStyle"
|
||||||
@mouseleave="onCalendarSceneMouseLeave"
|
@mouseleave="onCalendarSceneMouseLeave"
|
||||||
>
|
>
|
||||||
<div class="grid grid-cols-1 gap-2 sm:grid-cols-2 xl:grid-cols-3">
|
<div
|
||||||
|
class="grid grid-cols-1 gap-2 sm:grid-cols-2 xl:grid-cols-3 auto-rows-fr"
|
||||||
|
:style="calendarView === 'year' && calendarViewportHeight > 0 ? { minHeight: `${Math.max(420, calendarViewportHeight)}px` } : undefined"
|
||||||
|
>
|
||||||
<article
|
<article
|
||||||
v-for="item in yearMonths"
|
v-for="item in yearMonths"
|
||||||
:key="`year-month-${item.monthIndex}`"
|
:key="`year-month-${item.monthIndex}`"
|
||||||
@@ -178,7 +181,7 @@ defineProps<{
|
|||||||
class="group relative rounded-xl border border-base-300 p-3 text-left transition calendar-hover-targetable"
|
class="group relative rounded-xl border border-base-300 p-3 text-left transition calendar-hover-targetable"
|
||||||
:class="[
|
:class="[
|
||||||
calendarView === 'year'
|
calendarView === 'year'
|
||||||
? 'hover:border-primary/50 hover:bg-primary/5 cursor-zoom-in'
|
? 'h-full hover:border-primary/50 hover:bg-primary/5 cursor-zoom-in'
|
||||||
: 'cursor-default min-h-[26rem] bg-base-100 sm:col-span-2 xl:col-span-3',
|
: 'cursor-default min-h-[26rem] bg-base-100 sm:col-span-2 xl:col-span-3',
|
||||||
calendarHoveredMonthIndex === item.monthIndex ? 'calendar-hover-target' : '',
|
calendarHoveredMonthIndex === item.monthIndex ? 'calendar-hover-target' : '',
|
||||||
calendarZoomPrimeToken === calendarPrimeMonthToken(item.monthIndex) ? 'calendar-zoom-prime-active' : '',
|
calendarZoomPrimeToken === calendarPrimeMonthToken(item.monthIndex) ? 'calendar-zoom-prime-active' : '',
|
||||||
|
|||||||
Reference in New Issue
Block a user