Files
gpx.studio/website/src/lib/components/ui/calendar/calendar-prev-button.svelte

29 lines
675 B
Svelte
Raw Normal View History

2024-06-13 17:36:43 +02:00
<script lang="ts">
import { Calendar as CalendarPrimitive } from "bits-ui";
2025-06-08 16:32:41 +02:00
import ChevronLeft from "@lucide/svelte/icons/chevron-left";
2024-06-13 17:36:43 +02:00
import { buttonVariants } from "$lib/components/ui/button/index.js";
import { cn } from "$lib/utils.js";
2025-06-08 16:32:41 +02:00
let {
ref = $bindable(null),
class: className,
children,
...restProps
}: CalendarPrimitive.PrevButtonProps = $props();
2024-06-13 17:36:43 +02:00
</script>
2025-06-08 16:32:41 +02:00
{#snippet Fallback()}
<ChevronLeft class="size-4" />
{/snippet}
2024-06-13 17:36:43 +02:00
<CalendarPrimitive.PrevButton
2025-06-08 16:32:41 +02:00
bind:ref
2024-06-13 17:36:43 +02:00
class={cn(
buttonVariants({ variant: "outline" }),
2025-06-08 16:32:41 +02:00
"size-7 bg-transparent p-0 opacity-50 hover:opacity-100",
2024-06-13 17:36:43 +02:00
className
)}
2025-06-08 16:32:41 +02:00
children={children || Fallback}
{...restProps}
/>