21 lines
588 B
Plaintext
21 lines
588 B
Plaintext
component Pagination {
|
|
props {
|
|
@event change = function
|
|
@event previous = function
|
|
@event next = function
|
|
size = "default"
|
|
color = "primary"
|
|
label = "Pagination"
|
|
items = []
|
|
active = ""
|
|
orientation = "horizontal"
|
|
class = ""
|
|
}
|
|
view {
|
|
<nav class="wire-next wire-next--color-{color} wire-next--size-{size} wire-next--pagination wire-next--{orientation} {class}" aria-label="{label}">
|
|
{#each items as item}<a href="{item.href}" aria-current="{item.value === active ? 'page' : ''}">{item.label}</a>{/each}
|
|
<slot />
|
|
</nav>
|
|
}
|
|
}
|