Spaces:
Running
Running
File size: 624 Bytes
0c913b6 a1a6daf 0c913b6 |
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 |
<script lang="ts">
import CarbonCaretLeft from "~icons/carbon/caret-left";
import CarbonCaretRight from "~icons/carbon/caret-right";
interface Props {
href: string;
direction: "next" | "previous";
isDisabled?: boolean;
}
let { href, direction, isDisabled = false }: Props = $props();
</script>
<a
class="flex items-center rounded-lg px-2.5 py-1 hover:bg-gray-50 dark:hover:bg-gray-800 {isDisabled
? 'pointer-events-none opacity-50'
: ''}"
{href}
>
{#if direction === "previous"}
<CarbonCaretLeft classNames="mr-1.5" />
Previous
{:else}
Next
<CarbonCaretRight classNames="ml-1.5" />
{/if}
</a>
|