working paginator

This commit is contained in:
Evert Prants 2022-09-09 17:40:19 +03:00
parent 0a90ca6bb9
commit 409b512886
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
3 changed files with 11 additions and 6 deletions

View File

@ -2,11 +2,10 @@
appearance: none;
padding: 0.5rem 1.5rem;
border-radius: 4px;
cursor: pointer;
transition: background linear 0.33s;
&[disabled] {
cursor: default;
&:not([disabled]) {
cursor: pointer;
}
&.default {

View File

@ -10,13 +10,19 @@
&.previous {
border-top-left-radius: 8px;
border-bottom-left-radius: 8px;
border-right: 0;
}
&.next {
border-top-right-radius: 8px;
border-bottom-right-radius: 8px;
border-left: 0;
}
&:not(:last-of-type) {
border-right: 0;
}
&:not([disabled]) {
cursor: pointer;
}
}
}

View File

@ -37,7 +37,7 @@ export const Paginator = ({
<button
className={[styles.pageButton, styles.next].join(' ')}
onClick={() => setPage(pagination.page + 1)}
disabled={pagination.page + 1 >= pagination.pageCount}
disabled={pagination.page + 1 > pagination.pageCount}
>
Next
</button>