Skip to content

Commit

Permalink
Hide header menu when the screen is small
Browse files Browse the repository at this point in the history
  • Loading branch information
LesleyLai committed Oct 26, 2018
1 parent 31e6833 commit 1e3241c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
1 change: 1 addition & 0 deletions .env.local
@@ -0,0 +1 @@
REACT_EDITOR=emacs
10 changes: 10 additions & 0 deletions src/components/header/header.module.css
Expand Up @@ -54,6 +54,16 @@
padding: .85714286em 1.14285714em;
}

@media (max-width: 768px) {
.menu {
padding: .85714286em 1.14285714em;
}

.menuItem {
display: none;
}
}

.menuItem:hover {
color: #fff;
}
Expand Down
9 changes: 2 additions & 7 deletions src/components/header/headerMenu.tsx
@@ -1,6 +1,7 @@
import * as classNames from "classnames";
import Link from "gatsby-link";
import * as React from "react";
import { FaBars } from "react-icons/lib/fa";

import { MenuModel, menuModel } from "../menu";

Expand Down Expand Up @@ -36,13 +37,7 @@ const HeaderMenu = (props: HeaderMenuProp) => {
{Object.keys(menuModel).map((key: string) => (
<MenuItem key={key} pathname={props.pathname} itemName={key} />
))}
{/* <Menu.Item
as="button"
icon="content"
className="mobile only"
position="right"
size="large"
/>*/}
{<FaBars />}
</nav>
);
};
Expand Down

0 comments on commit 1e3241c

Please sign in to comment.