Something went wrong. Try again.
Monorepo for Tangled forked from tangled.org/core
Something went wrong. Try again.
12345678910111213141516171819202122232425<script lang="ts"> import { cn } from "tailwind-variants"; import Pagination from "#lib/components/ui/Pagination.svelte"; import Pending from "#lib/components/ui/Pending.svelte"; import { gotoPage } from "#lib/pagination.svelte.ts";
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={cn("flex justify-center", className)}> <Pagination page={currentPage} total={count} {labels} onchange={gotoPage} /> </div> {/if}</Pending>