Monorepo for Tangled
Something went wrong. Try again.
Svelte
123456789101112131415161718192021222324252627282930<script lang="ts"> import Pagination from "$lib/components/ui/Pagination.svelte"; import Pending from "$lib/components/ui/Pending.svelte"; import { gotoPage } from "$lib/pagination.svelte";
interface Props { page: number; pageCount: Promise<number> | number; labels?: boolean; class?: string; }
let { page: currentPage, pageCount, labels, class: className }: Props = $props();</script>
<Pending> {@const count = await pageCount} {#if count > 1} <div class="mt-md flex justify-center"> <Pagination page={currentPage} total={count} {labels} class={className} onchange={gotoPage} /> </div> {/if}</Pending>