Skip to content

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

Add configure button to menu

dominik-zeglen89dabbeb2c6d
diff --git a/saleor/static/dashboard-next/AppRoot.tsx b/saleor/static/dashboard-next/AppRoot.tsx
index 436bb3ec0d..e603aef453 100644
--- a/saleor/static/dashboard-next/AppRoot.tsx
+++ b/saleor/static/dashboard-next/AppRoot.tsx
@@ -13,6 +13,7 @@ import Toolbar from "@material-ui/core/Toolbar";
import Typography from "@material-ui/core/Typography";
import MenuIcon from "@material-ui/icons/Menu";
import PersonIcon from "@material-ui/icons/Person";
+import SettingsIcon from "@material-ui/icons/Settings";
import * as classNames from "classnames";
import * as React from "react";
import SVG from "react-inlinesvg";
@@ -93,6 +94,7 @@ const decorate = withStyles(
drawerDesktop: {
backgroundColor: "transparent",
borderRight: "0 none",
+ height: `calc(100vh - ${64 + theme.spacing.unit * 2}px)`,
marginTop: 64 + theme.spacing.unit * 2,
position: "relative" as "relative",
width: drawerWidth
@@ -122,8 +124,12 @@ const decorate = withStyles(
marginRight: theme.spacing.unit
},
menuList: {
+ display: "flex" as "flex",
+ flexDirection: "column" as "column",
+ height: "100%",
marginLeft: theme.spacing.unit * 4,
- marginTop: theme.spacing.unit * 2
+ marginTop: theme.spacing.unit * 2,
+ paddingBottom: theme.spacing.unit * 3
},
menuListItem: {
"&:hover": {
@@ -438,6 +444,22 @@ export const AppRoot = decorate(
menuItems={menuStructure}
onMenuItemClick={handleMenuItemClick}
/>
+ <div className={classes.spacer} />
+ <a
+ className={classes.menuListItem}
+ href={"/dashboard/next/configuration"}
+ onClick={event =>
+ handleMenuItemClick("/configuration", event)
+ }
+ >
+ <SettingsIcon />
+ <Typography
+ aria-label="configure"
+ className={classes.menuListItemText}
+ >
+ {i18n.t("Configure")}
+ </Typography>
+ </a>
</div>
</ResponsiveDrawer>
<main className={classes.content}>{children}</main>