mirror of
https://github.com/logto-io/logto.git
synced 2024-12-30 20:33:54 -05:00
refactor(console): disable invalid pagination labels (#3675)
This commit is contained in:
parent
dfef709b98
commit
d816734b20
2 changed files with 19 additions and 8 deletions
|
@ -46,13 +46,10 @@
|
|||
}
|
||||
|
||||
li.disabled {
|
||||
.button {
|
||||
cursor: not-allowed;
|
||||
background: var(--color-neutral-95);
|
||||
cursor: not-allowed;
|
||||
|
||||
&:hover {
|
||||
background: var(--color-neutral-95);
|
||||
}
|
||||
.button {
|
||||
background: var(--color-neutral-95);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -57,8 +57,22 @@ function Pagination({ page, totalCount, pageSize, className, mode = 'normal', on
|
|||
title={<DangerousRaw>{pageNumber}</DangerousRaw>}
|
||||
/>
|
||||
)}
|
||||
previousLabel={<Button className={styles.button} size="small" icon={<Previous />} />}
|
||||
nextLabel={<Button className={styles.button} size="small" icon={<Next />} />}
|
||||
previousLabel={
|
||||
<Button
|
||||
className={styles.button}
|
||||
size="small"
|
||||
icon={<Previous />}
|
||||
disabled={page === 1}
|
||||
/>
|
||||
}
|
||||
nextLabel={
|
||||
<Button
|
||||
className={styles.button}
|
||||
size="small"
|
||||
icon={<Next />}
|
||||
disabled={page === pageCount}
|
||||
/>
|
||||
}
|
||||
breakLabel={
|
||||
<Button className={styles.button} size="small" title={<DangerousRaw>...</DangerousRaw>} />
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue