* feat: remove tinymce & replace org sidebar * chore: PR Fixes * chore: move ui font into src dir * remove files in vite config * use google font import for loading font * remove custom font * more fonts update * remove font bold * more removals of font bold * fix import * checkpoint * chore: checkpoint (add course & lms shadcn sidebar) * minor css improvements and try out font sans * chore: replace carbon components with shadcn's * chore: replace carbon components with shadcn _ v3 * chore: ui fixes & storybook update * feat: UI cleanup * fix: quick ui fixes * chore: update pnpm-lock.yaml with new dependencies and versions; fix output.css formatting * chore: add isloading to button * feat: add loading state to button stories * chore: feedback fixes * fix: feedback fixes * chore: remove console * fix: PR comments * fix: PR comments --------- Co-authored-by: Rotimi Best <best@classroomio.com>
40 lines
799 B
Svelte
40 lines
799 B
Svelte
<script lang="ts">
|
|
import { Pagination as PaginationPrimitive } from 'bits-ui';
|
|
import { cn } from '../../tools';
|
|
import { type Props, buttonVariants } from '$src/base/button/index.js';
|
|
|
|
let {
|
|
ref = $bindable(null),
|
|
class: className,
|
|
size = 'icon',
|
|
isActive,
|
|
page,
|
|
children,
|
|
...restProps
|
|
}: PaginationPrimitive.PageProps &
|
|
Props & {
|
|
isActive: boolean;
|
|
} = $props();
|
|
</script>
|
|
|
|
{#snippet Fallback()}
|
|
{page.value}
|
|
{/snippet}
|
|
|
|
<PaginationPrimitive.Page
|
|
bind:ref
|
|
{page}
|
|
aria-current={isActive ? 'page' : undefined}
|
|
data-slot="pagination-link"
|
|
data-active={isActive}
|
|
class={cn(
|
|
buttonVariants({
|
|
variant: isActive ? 'outline' : 'ghost',
|
|
size
|
|
}),
|
|
className
|
|
)}
|
|
children={children || Fallback}
|
|
{...restProps}
|
|
/>
|