diff --git a/components/dashboard/src/Pagination/Pagination.tsx b/components/dashboard/src/Pagination/Pagination.tsx index bdb09451f5d0dd..ce6e22e9090e19 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; @@ -40,18 +40,12 @@ function Pagination(props: PaginationProps) { return ( ); diff --git a/components/dashboard/src/Pagination/PaginationNavigationButton.tsx b/components/dashboard/src/Pagination/PaginationNavigationButton.tsx new file mode 100644 index 00000000000000..8be4d34bb643f4 --- /dev/null +++ b/components/dashboard/src/Pagination/PaginationNavigationButton.tsx @@ -0,0 +1,44 @@ +/** + * 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; + arrowReversed: boolean; + onClick: () => void; +} + +function PaginationNavigationButton(props: PaginationNavigationButtonProps) { + const activeArrowClass = props.isDisabled + ? undefined + : "border-gray-500 dark:border-gray-400 group-hover:border-gray-600 dark:group-hover:border-gray-400"; + + return ( +