import classNames from "classnames"; import * as React from "react"; import { MdChevronLeft, MdChevronRight } from "react-icons/md"; import { IconButton } from "../IconButton"; import styles from "./Pagination.module.scss"; export type PaginationVariant = "primary" | "secondary"; export interface PaginationProps extends React.ComponentPropsWithoutRef<"div"> { currentPage: number; onChangePage: (page: number) => void; pages: number; variant?: PaginationVariant; } export const Pagination: React.FC = (props) => { const { className, currentPage, onChangePage, pages, variant = "secondary", ...rest } = props; const decreasePage = () => { if (currentPage - 1 > 0) { onChangePage(currentPage - 1); } }; const increasePage = () => { if (currentPage + 1 < pages + 1) { onChangePage(currentPage + 1); } }; return ( ); };