32 lines
806 B
JavaScript
32 lines
806 B
JavaScript
import { Pagination } from "@mui/material";
|
|
|
|
function PaginationContent({ page, pageDetail, changePage, limit = 12 }) {
|
|
const count = Math.ceil(pageDetail.totalRecords / limit);
|
|
|
|
return (
|
|
<Pagination
|
|
count={count}
|
|
page={page || 1}
|
|
onChange={changePage}
|
|
color="primary"
|
|
className={(!count || count < 2) && "!hidden"}
|
|
sx={{
|
|
"& .mui-8q7g72-MuiButtonBase-root-MuiPaginationItem-root": {
|
|
color: "#616161",
|
|
fontSize: "16px",
|
|
fontWeight: "500",
|
|
},
|
|
"& .mui-8q7g72-MuiButtonBase-root-MuiPaginationItem-root.Mui-selected":
|
|
{
|
|
color: "#F8F8FF",
|
|
},
|
|
"& .MuiSvgIcon-root": {
|
|
rotate: "180deg !important",
|
|
},
|
|
}}
|
|
/>
|
|
);
|
|
}
|
|
|
|
export default PaginationContent;
|