@@ -3,6 +3,7 @@ import type { VariantProps } from 'tailwind-variants'
33import type { CalendarRootProps , CalendarRootEmits , RangeCalendarRootEmits , DateRange , CalendarCellTriggerProps } from ' reka-ui'
44import type { DateValue } from ' @internationalized/date'
55import type { AppConfig } from ' @nuxt/schema'
6+ import type { ButtonProps } from ' ../types'
67import _appConfig from ' #build/app.config'
78import theme from ' #build/ui/calendar'
89import { tv } from ' ../utils/tv'
@@ -32,24 +33,44 @@ export interface CalendarProps<R extends boolean, M extends boolean> extends Omi
3233 * @IconifyIcon
3334 */
3435 nextYearIcon? : string
36+ /**
37+ * Configure the next year button.
38+ * `{ color: 'neutral', variant: 'ghost' }`{lang="ts-type"}
39+ */
40+ nextYear? : ButtonProps
3541 /**
3642 * The icon to use for the next month control.
3743 * @defaultValue appConfig.ui.icons.chevronRight
3844 * @IconifyIcon
3945 */
4046 nextMonthIcon? : string
47+ /**
48+ * Configure the next month button.
49+ * `{ color: 'neutral', variant: 'ghost' }`{lang="ts-type"}
50+ */
51+ nextMonth? : ButtonProps
4152 /**
4253 * The icon to use for the previous year control.
4354 * @defaultValue appConfig.ui.icons.chevronDoubleLeft
4455 * @IconifyIcon
4556 */
4657 prevYearIcon? : string
58+ /**
59+ * Configure the prev year button.
60+ * `{ color: 'neutral', variant: 'ghost' }`{lang="ts-type"}
61+ */
62+ prevYear? : ButtonProps
4763 /**
4864 * The icon to use for the previous month control.
4965 * @defaultValue appConfig.ui.icons.chevronLeft
5066 * @IconifyIcon
5167 */
5268 prevMonthIcon? : string
69+ /**
70+ * Configure the prev month button.
71+ * `{ color: 'neutral', variant: 'ghost' }`{lang="ts-type"}
72+ */
73+ prevMonth? : ButtonProps
5374 /**
5475 * @defaultValue 'primary'
5576 */
@@ -138,21 +159,21 @@ const Calendar = computed(() => props.range ? RangeCalendar : SingleCalendar)
138159 >
139160 <Calendar .Header :class =" ui.header({ class: props.ui?.header })" >
140161 <Calendar .Prev v-if =" props.yearControls" :prev-page =" (date: DateValue) => paginateYear(date, -1)" :aria-label =" t('calendar.prevYear')" as-child >
141- <UButton :icon =" prevYearIcon" :size =" props.size" color =" neutral" variant =" ghost" />
162+ <UButton :icon =" prevYearIcon" :size =" props.size" color =" neutral" variant =" ghost" v-bind = " props.prevYear " />
142163 </Calendar .Prev >
143164 <Calendar .Prev v-if =" props.monthControls" :aria-label =" t('calendar.prevMonth')" as-child >
144- <UButton :icon =" prevMonthIcon" :size =" props.size" color =" neutral" variant =" ghost" />
165+ <UButton :icon =" prevMonthIcon" :size =" props.size" color =" neutral" variant =" ghost" v-bind = " props.prevMonth " />
145166 </Calendar .Prev >
146167 <Calendar .Heading v-slot =" { headingValue }" :class =" ui.heading({ class: props.ui?.heading })" >
147168 <slot name =" heading" :value =" headingValue" >
148169 {{ headingValue }}
149170 </slot >
150171 </Calendar .Heading >
151172 <Calendar .Next v-if =" props.monthControls" :aria-label =" t('calendar.nextMonth')" as-child >
152- <UButton :icon =" nextMonthIcon" :size =" props.size" color =" neutral" variant =" ghost" />
173+ <UButton :icon =" nextMonthIcon" :size =" props.size" color =" neutral" variant =" ghost" v-bind = " props.nextMonth " />
153174 </Calendar .Next >
154175 <Calendar .Next v-if =" props.yearControls" :next-page =" (date: DateValue) => paginateYear(date, 1)" :aria-label =" t('calendar.nextYear')" as-child >
155- <UButton :icon =" nextYearIcon" :size =" props.size" color =" neutral" variant =" ghost" />
176+ <UButton :icon =" nextYearIcon" :size =" props.size" color =" neutral" variant =" ghost" v-bind = " props.nextYear " />
156177 </Calendar .Next >
157178 </Calendar .Header >
158179 <div :class =" ui.body({ class: props.ui?.body })" >
0 commit comments