import React, { useMemo } from "react"; import MuiTablePagination, { TablePaginationProps as MuiTablePaginationProps, } from "@mui/material/TablePagination"; import { useTableContext } from "../../contexts/TableContext"; export interface TablePaginationProps extends Omit {} export const TablePagination: React.FC = (props) => { const { count, page, changePage, rowsPerPage, rowsPerPageOptions, changeRowsPerPage } = useTableContext(); const defaultProps = useMemo( () => ({ rowsPerPageOptions, count, page, onPageChange: changePage, rowsPerPage, onRowsPerPageChange: changeRowsPerPage, sx: { borderBottom: "none", fontVariationSettings: { sm: '"wdth" 100', xs: '"wdth" 75' }, }, ...props, }), [rowsPerPageOptions, count, page, changePage, rowsPerPage, changeRowsPerPage, props], ); return ; }; export default TablePagination;