2021-05-13 13:23:25 +02:00
|
|
|
<script>
|
|
|
|
import "@spectrum-css/pagination/dist/index-vars.css"
|
2021-05-13 17:31:59 +02:00
|
|
|
import "@spectrum-css/actionbutton/dist/index-vars.css"
|
|
|
|
import "@spectrum-css/typography/dist/index-vars.css"
|
2021-05-13 13:23:25 +02:00
|
|
|
|
|
|
|
export let page
|
|
|
|
export let goToPrevPage
|
|
|
|
export let goToNextPage
|
|
|
|
export let hasPrevPage = true
|
|
|
|
export let hasNextPage = true
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<nav class="spectrum-Pagination spectrum-Pagination--explicit">
|
2021-05-13 17:31:59 +02:00
|
|
|
<div
|
2021-05-13 13:23:25 +02:00
|
|
|
href="#"
|
|
|
|
class="spectrum-ActionButton spectrum-ActionButton--sizeM spectrum-ActionButton--quiet spectrum-Pagination-prevButton"
|
|
|
|
on:click={hasPrevPage ? goToPrevPage : null}
|
|
|
|
class:is-disabled={!hasPrevPage}
|
|
|
|
>
|
|
|
|
<svg
|
|
|
|
class="spectrum-Icon spectrum-UIIcon-ChevronLeft100"
|
|
|
|
focusable="false"
|
|
|
|
aria-hidden="true"
|
|
|
|
aria-label="ChevronLeft"
|
|
|
|
>
|
|
|
|
<use xlink:href="#spectrum-css-icon-Chevron100" />
|
|
|
|
</svg>
|
2021-05-13 17:31:59 +02:00
|
|
|
</div>
|
2021-05-13 13:23:25 +02:00
|
|
|
<span class="spectrum-Body--secondary spectrum-Pagination-counter">
|
|
|
|
Page {page}
|
|
|
|
</span>
|
2021-05-13 17:31:59 +02:00
|
|
|
<div
|
2021-05-13 13:23:25 +02:00
|
|
|
href="#"
|
|
|
|
class="spectrum-ActionButton spectrum-ActionButton--sizeM spectrum-ActionButton--quiet spectrum-Pagination-nextButton"
|
|
|
|
on:click={hasNextPage ? goToNextPage : null}
|
|
|
|
class:is-disabled={!hasNextPage}
|
|
|
|
>
|
|
|
|
<svg
|
|
|
|
class="spectrum-Icon spectrum-UIIcon-ChevronRight100"
|
|
|
|
focusable="false"
|
|
|
|
aria-hidden="true"
|
|
|
|
aria-label="ChevronLeft"
|
|
|
|
>
|
|
|
|
<use xlink:href="#spectrum-css-icon-Chevron100" />
|
|
|
|
</svg>
|
2021-05-13 17:31:59 +02:00
|
|
|
</div>
|
2021-05-13 13:23:25 +02:00
|
|
|
</nav>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
.spectrum-Pagination-counter {
|
|
|
|
margin-left: 0;
|
2021-05-13 16:35:54 +02:00
|
|
|
user-select: none;
|
2021-05-13 13:23:25 +02:00
|
|
|
}
|
|
|
|
.is-disabled:hover {
|
|
|
|
cursor: initial;
|
|
|
|
}
|
|
|
|
</style>
|