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 {
|
li.disabled {
|
||||||
.button {
|
cursor: not-allowed;
|
||||||
cursor: not-allowed;
|
|
||||||
background: var(--color-neutral-95);
|
|
||||||
|
|
||||||
&:hover {
|
.button {
|
||||||
background: var(--color-neutral-95);
|
background: var(--color-neutral-95);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,8 +57,22 @@ function Pagination({ page, totalCount, pageSize, className, mode = 'normal', on
|
||||||
title={<DangerousRaw>{pageNumber}</DangerousRaw>}
|
title={<DangerousRaw>{pageNumber}</DangerousRaw>}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
previousLabel={<Button className={styles.button} size="small" icon={<Previous />} />}
|
previousLabel={
|
||||||
nextLabel={<Button className={styles.button} size="small" icon={<Next />} />}
|
<Button
|
||||||
|
className={styles.button}
|
||||||
|
size="small"
|
||||||
|
icon={<Previous />}
|
||||||
|
disabled={page === 1}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
nextLabel={
|
||||||
|
<Button
|
||||||
|
className={styles.button}
|
||||||
|
size="small"
|
||||||
|
icon={<Next />}
|
||||||
|
disabled={page === pageCount}
|
||||||
|
/>
|
||||||
|
}
|
||||||
breakLabel={
|
breakLabel={
|
||||||
<Button className={styles.button} size="small" title={<DangerousRaw>...</DangerousRaw>} />
|
<Button className={styles.button} size="small" title={<DangerousRaw>...</DangerousRaw>} />
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue