working paginator
This commit is contained in:
parent
0a90ca6bb9
commit
409b512886
@ -2,11 +2,10 @@
|
|||||||
appearance: none;
|
appearance: none;
|
||||||
padding: 0.5rem 1.5rem;
|
padding: 0.5rem 1.5rem;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
cursor: pointer;
|
|
||||||
transition: background linear 0.33s;
|
transition: background linear 0.33s;
|
||||||
|
|
||||||
&[disabled] {
|
&:not([disabled]) {
|
||||||
cursor: default;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.default {
|
&.default {
|
||||||
|
@ -10,13 +10,19 @@
|
|||||||
&.previous {
|
&.previous {
|
||||||
border-top-left-radius: 8px;
|
border-top-left-radius: 8px;
|
||||||
border-bottom-left-radius: 8px;
|
border-bottom-left-radius: 8px;
|
||||||
border-right: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&.next {
|
&.next {
|
||||||
border-top-right-radius: 8px;
|
border-top-right-radius: 8px;
|
||||||
border-bottom-right-radius: 8px;
|
border-bottom-right-radius: 8px;
|
||||||
border-left: 0;
|
}
|
||||||
|
|
||||||
|
&:not(:last-of-type) {
|
||||||
|
border-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:not([disabled]) {
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ export const Paginator = ({
|
|||||||
<button
|
<button
|
||||||
className={[styles.pageButton, styles.next].join(' ')}
|
className={[styles.pageButton, styles.next].join(' ')}
|
||||||
onClick={() => setPage(pagination.page + 1)}
|
onClick={() => setPage(pagination.page + 1)}
|
||||||
disabled={pagination.page + 1 >= pagination.pageCount}
|
disabled={pagination.page + 1 > pagination.pageCount}
|
||||||
>
|
>
|
||||||
Next
|
Next
|
||||||
</button>
|
</button>
|
||||||
|
Reference in New Issue
Block a user