diff --git a/apps/climatemappedafrica/src/components/Menu/index.js b/apps/climatemappedafrica/src/components/Menu/index.js index ccddec3ac..d1cc93413 100644 --- a/apps/climatemappedafrica/src/components/Menu/index.js +++ b/apps/climatemappedafrica/src/components/Menu/index.js @@ -3,7 +3,7 @@ import { Grid, Typography } from "@mui/material"; import PropTypes from "prop-types"; import React from "react"; -function Menu({ children, explorePagePath, links, socialLinks }) { +function Menu({ children, explorePagePath, links, socialLinks, LinkProps }) { if (!links?.length) { return null; } @@ -60,6 +60,7 @@ function Menu({ children, explorePagePath, links, socialLinks }) { padding: `${typography.pxToRem(16)} ${typography.pxToRem(30)} `, border: "1px solid", }, + ...LinkProps, })} > ({ - label: { - [breakpoints.up("lg")]: { - fontWeight: 600, - letterSpacing: "1.6px", - fontSize: typography.pxToRem(20), - }, - }, - buttonMenu: { - margin: 0, - }, - links: { - display: "inline-block", - }, - menuLinks: { - color: palette.text.secondary, - display: "inline-block", - margin: `${typography.pxToRem(10)} 0`, - "&:hover, &:focus, &:focus-within": { - backgroundColor: "transparent", - textDecoration: "none", - color: palette.text.secondary, - }, - }, - mainMenu: { - [breakpoints.up("lg")]: { - flexDirection: "column", - justifyContent: "flex-start", - }, - }, -})); - const Transition = React.forwardRef(function Transition(props, ref) { return ; }); @@ -65,9 +33,9 @@ function MobileNavigation({ sx, ...props }) { - const classes = useStyles(props); const [open, setOpen] = useState(false); const router = useRouter(); + const theme = useTheme(); const handleClickOpen = (e) => { e?.preventDefault(); @@ -103,8 +71,8 @@ function MobileNavigation({ aria-label="Open drawer" size="medium" onClick={handleClickOpen} - sx={(theme) => ({ - color: theme.palette.grey.dark, + sx={({ palette }) => ({ + color: palette.grey.dark, padding: 0, })} > @@ -189,12 +157,9 @@ function MobileNavigation({ explorePagePath={explorePagePath} links={menus} socialLinks={socialLinks} - classes={{ - root: classes.mainMenu, - links: classes.links, - menuLinks: classes.menuLinks, - label: classes.label, - menu: classes.buttonMenu, + LinkProps={{ + padding: 0, + margin: `${theme.typography.pxToRem(10)} 0`, }} >