Path: blob/main/components/dashboard/src/Pagination/PaginationNavigationButton.tsx
2500 views
/**1* Copyright (c) 2022 Gitpod GmbH. All rights reserved.2* Licensed under the GNU Affero General Public License (AGPL).3* See License.AGPL.txt in the project root for license information.4*/56import Arrow from "../components/Arrow";78interface PaginationNavigationButtonProps {9isDisabled: boolean;10label: string;11arrowDirection: string;12onClick: () => void;13}1415function PaginationNavigationButton(props: PaginationNavigationButtonProps) {16const activeArrowClass = props.isDisabled17? "border-gray-300 dark:border-gray-500"18: "border-gray-500 dark:border-gray-400 group-hover:border-gray-600 dark:group-hover:border-gray-400";1920return (21<li22className={`font-semibold text-gray-300 ${23props.isDisabled ? "disabled dark:text-gray-500" : "cursor-pointer dark:text-gray-400 text-gray-500"24}`}25>26<span onClick={props.onClick}>27{props.arrowDirection === "right" && props.label}28<Arrow direction={props.arrowDirection} customBorderClasses={activeArrowClass} />29{props.arrowDirection === "left" && props.label}30</span>31</li>32);33}3435export default PaginationNavigationButton;363738