import { Button } from "@ui/components/button"; import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react"; export type PaginatioProps = { className?: string; totalItems: number; itemsPerPage: number; currentPage: number; onChangeCurrentPage: (page: number) => void; }; const Pagination = ({ currentPage, totalItems, itemsPerPage, className, onChangeCurrentPage, }: PaginatioProps) => { const numberOfPages = Math.ceil(totalItems / itemsPerPage); return (
{currentPage * itemsPerPage - itemsPerPage + 1} -{" "} {currentPage * itemsPerPage > totalItems ? totalItems : currentPage * itemsPerPage}{" "} of {totalItems}
); }; Pagination.displayName = "Pagination"; export { Pagination };