complete datatable getting data with swr

This commit is contained in:
2024-07-13 14:03:37 +03:30
parent c84d253721
commit 5e723a4de7
19 changed files with 550 additions and 369 deletions

View File

@@ -9,6 +9,23 @@ import HeaderMenu from "./HeaderMenu";
const drawerWidth = 300;
const ScrollBox = styled(Box)({
flexGrow: 1,
overflowY: "scroll",
width: "calc(100% - ${drawerWidth}px)",
"&::-webkit-scrollbar": {
width: "5px",
},
"&::-webkit-scrollbar-track": {
boxShadow: "inset 0 0 5px #fff",
borderRadius: "5px",
},
"&::-webkit-scrollbar-thumb": {
background: "#155175",
borderRadius: "5px",
},
});
const Main = styled(Paper, { shouldForwardProp: (prop) => prop !== "open" })(({ theme, open }) => ({
flexGrow: 1,
transition: theme.transitions.create("margin", {
@@ -102,9 +119,9 @@ const HeaderWithSidebar = ({ children }) => {
</Drawer>
<Main elevation={0} open={open}>
<DrawerHeader />
{children}
<ScrollBox>{children}</ScrollBox>
</Main>
</Box>
);
};
export default HeaderWithSidebar;
export default HeaderWithSidebar;