docs(pagination-nav): add more examples (#1514)

Adds "Reactive example," "Total," "Shown," and "Custom button text."
This commit is contained in:
metonym 2022-10-08 13:38:11 -07:00 committed by GitHub
commit b5b392963e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 49 additions and 0 deletions

View file

@ -0,0 +1,16 @@
<script>
import { PaginationNav, Button } from "carbon-components-svelte";
let page = 2;
</script>
<PaginationNav bind:page />
<div style="margin: var(--cds-layout-01) 0">
<Button on:click="{() => (page = 0)}" disabled="{page === 0}">
Set page to 0
</Button>
</div>
<strong>page:</strong>
{page}