import React, { useState } from 'react'; import SingleArrowLeft from '../assets/single-left-arrow.svg'; import SingleArrowRight from '../assets/single-right-arrow.svg'; import DoubleArrowLeft from '../assets/double-arrow-left.svg'; import DoubleArrowRight from '../assets/double-arrow-right.svg'; interface PaginationProps { currentPage: number; totalPages: number; rowsPerPage: number; onPageChange: (page: number) => void; onRowsPerPageChange: (rows: number) => void; } const Pagination: React.FC = ({ currentPage, totalPages, rowsPerPage, onPageChange, onRowsPerPageChange, }) => { const [rowsPerPageOptions] = useState([5, 10, 15, 20]); const handlePreviousPage = () => { if (currentPage > 1) { onPageChange(currentPage - 1); } }; const handleNextPage = () => { if (currentPage < totalPages) { onPageChange(currentPage + 1); } }; const handleFirstPage = () => { onPageChange(1); }; const handleLastPage = () => { onPageChange(totalPages); }; return (
Rows per page:
Page {currentPage} of {totalPages}
); }; export default Pagination;