mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
23 lines
535 B
Svelte
23 lines
535 B
Svelte
<script>
|
|
/** Specify the current page index */
|
|
export let page = 1;
|
|
|
|
/** Set to `true` to use the active state */
|
|
export let active = false;
|
|
</script>
|
|
|
|
<li class:bx--pagination-nav__list-item={true}>
|
|
<button
|
|
type="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>
|