31 lines
892 B
Vue
31 lines
892 B
Vue
<script lang="ts" setup>
|
|
import type { RangeCalendarPrevProps } from "reka-ui"
|
|
import type { HTMLAttributes } from "vue"
|
|
import { reactiveOmit } from "@vueuse/core"
|
|
import { IconChevronLeft } from "@tabler/icons-vue"
|
|
import { RangeCalendarPrev, useForwardProps } from "reka-ui"
|
|
import { cn } from "@/lib/utils"
|
|
import { buttonVariants } from '@/components/ui/button'
|
|
|
|
const props = defineProps<RangeCalendarPrevProps & { class?: HTMLAttributes["class"] }>()
|
|
|
|
const delegatedProps = reactiveOmit(props, "class")
|
|
|
|
const forwardedProps = useForwardProps(delegatedProps)
|
|
</script>
|
|
|
|
<template>
|
|
<RangeCalendarPrev
|
|
data-slot="range-calendar-prev-button"
|
|
:class="cn(
|
|
buttonVariants({ variant: 'outline' }),
|
|
'size-7 p-0',
|
|
props.class,
|
|
)"
|
|
v-bind="forwardedProps"
|
|
>
|
|
<slot>
|
|
<IconChevronLeft class="size-4" />
|
|
</slot>
|
|
</RangeCalendarPrev>
|
|
</template>
|