0
Fork 0
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:
Xiao Yijun 2023-04-04 16:39:32 +08:00 committed by GitHub
parent dfef709b98
commit d816734b20
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 8 deletions

View file

@ -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);
}
}

View file

@ -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>} />
}