import * as React from "react"; import styled from "styled-components"; import { Drawer } from "@material-ui/core"; import { Link } from "react-router-dom"; import Menu from "@material-ui/icons/Menu"; import { Logo } from "./Logo"; import theme from "@sc/plugins/misc/v2/blocks/weblayouts/theme"; import { EditorMode } from "@sc/modules/v2/Editor/types"; interface HamburgerProps { mode?: EditorMode; hamburgerIconStyle: any; logo?: string; logoHref?: string; logoStyle?: any; items?: any[]; linkStyle?: any; } export const Hamburger: React.FC = ({ hamburgerIconStyle, linkStyle, logoHref, logo, logoStyle, items, }) => { const [menuIsShowing, setMenuIsShowing] = React.useState(false); const [menuIsHighlighted, setMenuIsHighlighted] = React.useState(false); const hamburgerMenuLinkStyle = { ...linkStyle, color: "black", textAlign: "center", display: "block", fontSize: "18pt", padding: "20px 80px", }; const LI = styled.li` &:hover { text-decoration: underline; } `; return ( <> setMenuIsShowing(false)} >
  • Home
  • {items.map((itm) => (
  • {itm.caption}
  • ))}
    setMenuIsShowing(!menuIsShowing)} onMouseEnter={() => setMenuIsHighlighted(true)} onMouseLeave={() => setMenuIsHighlighted(false)} >
    ); }; Hamburger.defaultProps = { hamburgerIconStyle: { borderRadius: "100%", width: 40, height: 40, border: "1px solid #333", padding: 4, marginTop: 5, }, };