mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-10 04:19:32 +00:00
39 lines
881 B
Vue
39 lines
881 B
Vue
<script lang="ts" setup>
|
|
import { type HTMLAttributes, computed } from "vue";
|
|
import {
|
|
CalendarPrev,
|
|
type CalendarPrevProps,
|
|
useForwardProps,
|
|
} from "radix-vue";
|
|
import { ChevronLeftIcon } from "@radix-icons/vue";
|
|
import { cn } from "@/lib/utils";
|
|
import { buttonVariants } from "@/components/ui/button";
|
|
|
|
const props = defineProps<
|
|
CalendarPrevProps & { class?: HTMLAttributes["class"] }
|
|
>();
|
|
|
|
const delegatedProps = computed(() => {
|
|
const { class: _, ...delegated } = props;
|
|
|
|
return delegated;
|
|
});
|
|
|
|
const forwardedProps = useForwardProps(delegatedProps);
|
|
</script>
|
|
|
|
<template>
|
|
<CalendarPrev
|
|
:class="cn(
|
|
buttonVariants({ variant: 'outline' }),
|
|
'h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100',
|
|
props.class,
|
|
)"
|
|
v-bind="forwardedProps"
|
|
>
|
|
<slot>
|
|
<ChevronLeftIcon class="h-4 w-4" />
|
|
</slot>
|
|
</CalendarPrev>
|
|
</template>
|