sidebar tweak
This commit is contained in:
1 parent
6f6920f3b2
commit
e214d9a54c
2 files changed
+12
-2
No files matched your search
@@ -76,7 +76,7 @@ export const AuthFooter = ({ collapsed, accountMenuItems }: AuthFooterProps) =>
|
|||||||
alignItems="center"
|
alignItems="center"
|
||||||
py={theme.spacing(4)}
|
py={theme.spacing(4)}
|
||||||
px={theme.spacing(8)}
|
px={theme.spacing(8)}
|
||||||
gap={theme.spacing(2)}
|
gap={theme.spacing(4)}
|
||||||
>
|
>
|
||||||
<Avatar
|
<Avatar
|
||||||
small
|
small
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
|
import Backdrop from "@mui/material/Backdrop";
|
||||||
import Stack from "@mui/material/Stack";
|
import Stack from "@mui/material/Stack";
|
||||||
import List from "@mui/material/List";
|
import List from "@mui/material/List";
|
||||||
import Divider from "@mui/material/Divider";
|
import Divider from "@mui/material/Divider";
|
||||||
@@ -51,6 +52,12 @@ export const Sidebar = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<>
|
||||||
|
<Backdrop
|
||||||
|
open={!collapsed && isSmall}
|
||||||
|
onClick={() => dispatch(setCollapsed({ collapsed: true }))}
|
||||||
|
sx={{ zIndex: 999 }}
|
||||||
|
/>
|
||||||
<Stack
|
<Stack
|
||||||
component="aside"
|
component="aside"
|
||||||
position={isSmall ? "fixed" : "sticky"}
|
position={isSmall ? "fixed" : "sticky"}
|
||||||
@@ -64,8 +71,10 @@ export const Sidebar = () => {
|
|||||||
borderRight={`1px solid ${theme.palette.divider}`}
|
borderRight={`1px solid ${theme.palette.divider}`}
|
||||||
width={width}
|
width={width}
|
||||||
sx={{
|
sx={{
|
||||||
|
touchAction: "none",
|
||||||
transition: transition,
|
transition: transition,
|
||||||
zIndex: isSmall ? (t) => t.zIndex.drawer : "auto",
|
zIndex: 1000,
|
||||||
|
backdropFilter: "blur(8px)",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<List
|
<List
|
||||||
@@ -117,5 +126,6 @@ export const Sidebar = () => {
|
|||||||
accountMenuItems={accountMenu}
|
accountMenuItems={accountMenu}
|
||||||
/>
|
/>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
Reference in new issue
Block a user