File size: 782 Bytes
90ad830
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<script lang="ts">
	import { ChevronLeft, ChevronRight } from '@lucide/svelte';
	import { Button } from '$lib/components/ui/button';

	interface Props {
		onPrev: () => void;
		onNext: () => void;
		show: boolean;
	}

	let { onNext, onPrev, show }: Props = $props();
</script>

{#if show}
	<Button
		aria-label="Previous"
		class="absolute top-1/2 left-4 z-10 h-8 w-8 -translate-y-1/2 rounded-full bg-background/5 p-0 text-white!"
		onclick={onPrev}
		size="icon"
		variant="secondary"
	>
		<ChevronLeft class="size-4" />
	</Button>

	<Button
		aria-label="Next"
		class="absolute top-1/2 right-4 z-10 h-8 w-8 -translate-y-1/2 rounded-full bg-background/5 p-0 text-white!"
		onclick={onNext}
		size="icon"
		variant="secondary"
	>
		<ChevronRight class="size-4" />
	</Button>
{/if}