complete datatable getting data with swr
This commit is contained in:
@@ -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;
|
||||
Reference in New Issue
Block a user