mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
fix: templating padding
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import { Layout, Typography } from '@appwrite.io/pink-svelte';
|
||||
import PaginationInline from './paginationInline.svelte';
|
||||
import Limit from './limit.svelte';
|
||||
import type { Snippet } from 'svelte';
|
||||
|
||||
let {
|
||||
items = [],
|
||||
@@ -10,7 +11,19 @@
|
||||
hidePages = true,
|
||||
hasLimit = false,
|
||||
name = 'items',
|
||||
gap = 's',
|
||||
children
|
||||
}: {
|
||||
items: unknown[];
|
||||
limit: number;
|
||||
hideFooter?: boolean;
|
||||
hidePages?: boolean;
|
||||
hasLimit?: boolean;
|
||||
name?: string;
|
||||
gap?:
|
||||
| ('none' | 'xxxs' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | 'xxxl')
|
||||
| undefined;
|
||||
children: Snippet<[unknown[], number]>;
|
||||
} = $props();
|
||||
|
||||
let total = $derived(items.length);
|
||||
@@ -20,7 +33,7 @@
|
||||
let paginatedItems = $derived(items.slice(offset, offset + limit));
|
||||
</script>
|
||||
|
||||
<Layout.Stack gap="s">
|
||||
<Layout.Stack {gap}>
|
||||
{@render children(paginatedItems, limit)}
|
||||
|
||||
{#if !hideFooter}
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
</svelte:fragment>
|
||||
<Layout.Stack gap="l">
|
||||
{#if data.templates?.length > 0}
|
||||
<Paginator items={data.templates} limit={12} hidePages={false} hasLimit>
|
||||
<Paginator items={data.templates} limit={12} hidePages={false} hasLimit gap="m">
|
||||
{#snippet children(paginatedItems: typeof data.templates)}
|
||||
<Layout.Grid columns={3} columnsXS={2} columnsXXS={1}>
|
||||
{#each paginatedItems as template (template.name)}
|
||||
|
||||
Reference in New Issue
Block a user