diff --git a/components/dashboard/src/Pagination/Pagination.tsx b/components/dashboard/src/Pagination/Pagination.tsx index ff5045deeba6d8..24ad71267f342e 100644 --- a/components/dashboard/src/Pagination/Pagination.tsx +++ b/components/dashboard/src/Pagination/Pagination.tsx @@ -5,7 +5,7 @@ */ import { getPaginationNumbers } from "./getPagination"; -import Arrow from "../components/Arrow"; +import PaginationNavigationButton from "./PaginationNavigationButton"; interface PaginationProps { totalNumberOfPages: number; @@ -29,23 +29,23 @@ function Pagination(props: PaginationProps) { }; const getClassnames = (pageNumber: string | number) => { if (pageNumber === currentPage) { - return "text-gray-500 w-8 text-center rounded-md hover:bg-gray-50 bg-gray-100 disabled pointer-events-none"; + return "font-semibold text-gray-500 dark:text-gray-400 max-h-9 max-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 px-3 py-2"; } if (pageNumber === "...") { - return "text-gray-500 w-8 text-center rounded-md hover:bg-gray-50 disabled pointer-events-none"; + return "font-semibold text-gray-500 dark:text-gray-400 max-h-9 max-w-8 flex items-center justify-center rounded-md hover:bg-gray-50 dark:hover:bg-gray-800 disabled pointer-events-none px-3 py-2"; } - return "text-gray-500 w-8 text-center rounded-md hover:bg-gray-50 cursor-pointer"; + return "font-semibold text-gray-500 dark:text-gray-400 max-h-9 max-w-8 flex items-center justify-center rounded-md hover:bg-gray-50 dark:hover:bg-gray-800 cursor-pointer px-3 py-2"; }; return ( ); diff --git a/components/dashboard/src/Pagination/PaginationNavigationButton.tsx b/components/dashboard/src/Pagination/PaginationNavigationButton.tsx new file mode 100644 index 00000000000000..13b303037b2a89 --- /dev/null +++ b/components/dashboard/src/Pagination/PaginationNavigationButton.tsx @@ -0,0 +1,36 @@ +/** + * Copyright (c) 2022 Gitpod GmbH. All rights reserved. + * Licensed under the GNU Affero General Public License (AGPL). + * See License-AGPL.txt in the project root for license information. + */ + +import Arrow from "../components/Arrow"; + +interface PaginationNavigationButtonProps { + isDisabled: boolean; + label: string; + arrowDirection: string; + onClick: () => void; +} + +function PaginationNavigationButton(props: PaginationNavigationButtonProps) { + const activeArrowClass = props.isDisabled + ? "border-gray-300 dark:border-gray-500" + : "border-gray-500 dark:border-gray-400 group-hover:border-gray-600 dark:group-hover:border-gray-400"; + + return ( +