Skip to content

Commit 06abd68

Browse files
Hardik500Laurie T. Malau
authored and
Laurie T. Malau
committed
Added basic set of design fixes for pagination
1 parent 389f776 commit 06abd68

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

components/dashboard/src/Pagination/Pagination.tsx

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,24 @@ function Pagination(props: PaginationProps) {
2929
};
3030
const getClassnames = (pageNumber: string | number) => {
3131
if (pageNumber === currentPage) {
32-
return "text-gray-500 w-8 text-center rounded-md hover:bg-gray-50 bg-gray-100 disabled pointer-events-none";
32+
return "text-gray-500 dark:text-gray-400 h-9 w-8 flex items-center justify-center rounded-md hover:bg-gray-50 dark:hover:bg-gray-800 dark:bg-gray-700 bg-gray-100 disabled pointer-events-none";
3333
}
3434
if (pageNumber === "...") {
35-
return "text-gray-500 w-8 text-center rounded-md hover:bg-gray-50 disabled pointer-events-none";
35+
return "text-gray-500 dark:text-gray-400 h-9 w-8 flex items-center justify-center rounded-md hover:bg-gray-50 dark:hover:bg-gray-800 disabled pointer-events-none";
3636
}
37-
return "text-gray-500 w-8 text-center rounded-md hover:bg-gray-50 cursor-pointer";
37+
return "text-gray-500 dark:text-gray-400 h-9 w-8 flex items-center justify-center rounded-md hover:bg-gray-50 dark:hover:bg-gray-800 cursor-pointer";
3838
};
3939

4040
return (
4141
<nav className="mt-16 mb-16">
42-
<ul className="flex justify-center space-x-4">
43-
<li className={`text-gray-400 ${currentPage === 1 ? "disabled" : "cursor-pointer text-gray-500"}`}>
42+
<ul className="flex justify-center items-center space-x-4">
43+
<li
44+
className={`font-bold text-gray-300 ${
45+
currentPage === 1
46+
? "disabled dark:text-gray-500"
47+
: "cursor-pointer dark:text-gray-400 text-gray-500"
48+
}`}
49+
>
4450
<span onClick={prevPage}>
4551
<Arrow direction={"left"} />
4652
Previous
@@ -57,8 +63,10 @@ function Pagination(props: PaginationProps) {
5763
);
5864
})}
5965
<li
60-
className={`text-gray-400 ${
61-
currentPage === totalNumberOfPages ? "disabled" : "cursor-pointer text-gray-500"
66+
className={`font-bold text-gray-300 ${
67+
currentPage === totalNumberOfPages
68+
? "disabled dark:text-gray-500"
69+
: "cursor-pointer dark:text-gray-400 text-gray-500"
6270
}`}
6371
>
6472
<span onClick={nextPage}>

0 commit comments

Comments
 (0)