Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Fix menu shadow

Krzysztof Bialoglowiczcee95abd0591
diff --git a/saleor/static/dashboard-next/components/AppLayout/AppLayout.tsx b/saleor/static/dashboard-next/components/AppLayout/AppLayout.tsx
index 9048254bb8..d07ae42d2b 100644
--- a/saleor/static/dashboard-next/components/AppLayout/AppLayout.tsx
+++ b/saleor/static/dashboard-next/components/AppLayout/AppLayout.tsx
@@ -128,7 +128,6 @@ const styles = (theme: Theme) =>
},
menu: {
background: theme.palette.background.paper,
- boxShadow: "0px 0px 12px 1px rgba(0,0,0,0.2)",
height: "100vh",
padding: 25
},
@@ -192,7 +191,6 @@ const styles = (theme: Theme) =>
},
menuSmall: {
background: theme.palette.background.paper,
- boxShadow: "0px 0px 12px 1px rgba(0,0,0,0.2)",
height: "100vh",
padding: 25
},
diff --git a/saleor/static/dashboard-next/components/AppLayout/MenuList.tsx b/saleor/static/dashboard-next/components/AppLayout/MenuList.tsx
index 3913f4f5a7..5f88428c5c 100644
--- a/saleor/static/dashboard-next/components/AppLayout/MenuList.tsx
+++ b/saleor/static/dashboard-next/components/AppLayout/MenuList.tsx
@@ -37,6 +37,9 @@ const styles = (theme: Theme) =>
fill: theme.palette.common.white
}
},
+ menuIsActive: {
+ boxShadow: "0px 0px 12px 1px rgba(0,0,0,0.2)"
+ },
menuItemHover: {
"& path": {
transition: "fill 0.5s ease"
@@ -120,13 +123,13 @@ const styles = (theme: Theme) =>
subMenuDrawerOpen: {
"&$subMenuDrawerSmall": {
left: drawerWidthExpanded,
- width: `calc(100vw - ${drawerWidthExpanded})px`
+ width: `calc(100vw - ${drawerWidthExpanded}px)`
},
width: `calc(100vw - ${drawerWidthExpanded}px)`
},
subMenuDrawerSmall: {
left: drawerWidth,
- width: `calc(100vw - ${drawerWidth})px`
+ width: `calc(100vw - ${drawerWidth}px)`
}
});
@@ -183,7 +186,11 @@ const MenuList = withStyles(styles, { name: "MenuList" })(
};
return (
- <div className={className}>
+ <div
+ className={classNames(className, {
+ [classes.menuIsActive]: activeSubMenu.isActive
+ })}
+ >
{/* FIXME: this .split("?")[0] looks gross */}
{menuItems.map(menuItem => {
const isActive = (menuItem: IMenuItem) =>