bananas-commerce-admin
Version:
What's this, an admin for apes?
22 lines • 921 B
JavaScript
import React, { useMemo } from "react";
import MuiTablePagination from "@mui/material/TablePagination";
import { useTableContext } from "../../contexts/TableContext";
export const TablePagination = (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 React.createElement(MuiTablePagination, { ...defaultProps });
};
export default TablePagination;
//# sourceMappingURL=TablePagination.js.map