Skip to content

Commit

Permalink
Update paginationStore/Paginate/Pagination docs
Browse files Browse the repository at this point in the history
  • Loading branch information
techniq committed Jun 26, 2023
1 parent 6907b70 commit a42bf5b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/routes/docs/components/Paginate/+page.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@

```svelte
<script lang="ts">
import { Paginate } from 'svelte-ux';
import { Paginate, Pagination } from 'svelte-ux';
</script>
<Paginate {items} let:pagination let pageItems>
<Paginate {items} let:pageItems let:pagination>
{#each pageItems as child}
<!-- render item -->
{/each}
<Pagination {pagination} />
</Paginate>
```

Expand All @@ -29,7 +30,7 @@
<h2>Default</h2>

<Preview>
<Paginate {items} let:pagination let:pageItems >
<Paginate {items} let:pageItems let:pagination>
{#each pageItems as child}
<ListItem title={child.name} />
{/each}
Expand All @@ -42,7 +43,7 @@
<h2>Per page</h2>

<Preview>
<Paginate {items} perPage={5} let:pagination let:pageItems >
<Paginate {items} perPage={5} let:pageItems let:pagination>
{#each pageItems as child}
<ListItem title={child.name} />
{/each}
Expand Down
2 changes: 2 additions & 0 deletions src/routes/docs/components/Paginate/+page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ import pageSource from './+page.md?raw';
export async function load() {
return {
meta: {
description: 'Client-side paginate through',
source,
pageSource,
hideUsage: true,
related: ['components/Pagination'],
},
};
}
4 changes: 4 additions & 0 deletions src/routes/docs/components/Pagination/+page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ import pageSource from './+page.md?raw';
export async function load() {
return {
meta: {
description:
'Controls to navigate through paginated results. Works with `paginationStore()` or `Paginate` component',
source,
pageSource,
hideUsage: true,
features: ['Easily customize display of results and controls'],
related: ['stores/paginationStore', 'components/Paginate'],
},
};
}
1 change: 1 addition & 0 deletions src/routes/docs/stores/paginationStore/+page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export async function load() {
meta: {
source,
pageSource,
related: ['components/Paginate', 'components/Pagination'],
},
};
}

1 comment on commit a42bf5b

@vercel
Copy link

@vercel vercel bot commented on a42bf5b Jun 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.