feat: add PaginationNav component

This commit is contained in:
Eric Liu 2020-07-22 18:14:08 -07:00
commit 8473589e3a
7 changed files with 244 additions and 0 deletions

View file

@ -0,0 +1,18 @@
<script>
export let page = 0;
export let active = false;
</script>
<li class:bx--pagination-nav__list-item={true}>
<button
data-page={page}
aria-current={active ? 'page' : undefined}
class:bx--pagination-nav__page={true}
class:bx--pagination-nav__page--active={active}
on:click>
<span class:bx--pagination-nav__accessibility-label={true}>
<slot />
</span>
{page}
</button>
</li>