mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-09 16:52:17 +01:00
34 lines
976 B
Vue
34 lines
976 B
Vue
<script lang="ts" setup>
|
|
import { cn } from '@/lib/utils';
|
|
import { buttonVariants } from '@/Components/ui/button';
|
|
import { ChevronLeft } from 'lucide-vue-next';
|
|
import { RangeCalendarPrev, type RangeCalendarPrevProps, useForwardProps } from 'reka-ui';
|
|
import { computed, type HTMLAttributes } from 'vue';
|
|
|
|
const props = defineProps<RangeCalendarPrevProps & { class?: HTMLAttributes['class'] }>();
|
|
|
|
const delegatedProps = computed(() => {
|
|
const { class: _, ...delegated } = props;
|
|
|
|
return delegated;
|
|
});
|
|
|
|
const forwardedProps = useForwardProps(delegatedProps);
|
|
</script>
|
|
|
|
<template>
|
|
<RangeCalendarPrev
|
|
:class="
|
|
cn(
|
|
buttonVariants({ variant: 'outline' }),
|
|
'h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100',
|
|
props.class
|
|
)
|
|
"
|
|
v-bind="forwardedProps">
|
|
<slot>
|
|
<ChevronLeft class="h-4 w-4" />
|
|
</slot>
|
|
</RangeCalendarPrev>
|
|
</template>
|