mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
27 lines
607 B
Svelte
27 lines
607 B
Svelte
<script>
|
|
/**
|
|
* Specify the current page index
|
|
* @type {number} [page=0]
|
|
*/
|
|
export let page = 0;
|
|
|
|
/**
|
|
* Set to `true` to use the active state
|
|
* @type {boolean} [active=false]
|
|
*/
|
|
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>
|