Skip to content
Permalink
Browse files

Add active prop to determine actively styled page

  • Loading branch information...
BrettJay committed May 16, 2019
1 parent da5c657 commit 3f93b8faa82c7a6cb2895e64ba606afb6d89d673
Showing with 6 additions and 29 deletions.
  1. +3 −2 src/components/responsive-menu/header.js
  2. +2 −26 src/pages/brew-print.mdx
  3. +1 −1 src/pages/may-9.mdx
@@ -3,11 +3,12 @@ import Menu from "./menu.module.scss"
import React from "react"

function MilligramHeader(props) {
const { active } = props
return (
<React.Fragment>
<div className={Menu.header}/>
<nav className={Menu.navigation}>
<a className={Menu.active}>
<a className={active === 'home' && `${Menu.active}`}>
<div className={`${Menu.icon} ${Menu.home}`}/>
<div className={Menu.label}>Feed</div>
</a>
@@ -23,7 +24,7 @@ function MilligramHeader(props) {
<div className={`${Menu.icon} ${Menu.notifications}`}/>
<div className={Menu.label}>Notifications</div>
</a>
<a>
<a className={active === 'profile' && `${Menu.active}`}>
<div className={`${Menu.icon} ${Menu.profile}`}/>
<div className={Menu.label}>Profile</div>
</a>
@@ -1,31 +1,7 @@
import Menu from "../components/responsive-menu/menu.module.scss"
import Header from "../components/responsive-menu/header"

<div className={Menu.container}>
<div className={Menu.header}/>
<nav className={Menu.navigation}>
<a>
<div className={`${Menu.icon} ${Menu.home}`}/>
<div className={Menu.label}>Feed</div>
</a>
<a>
<div className={`${Menu.icon} ${Menu.search}`}/>
<div className={Menu.label}>Search</div>
</a>
<a>
<div className={`${Menu.icon} ${Menu.add}`}/>
<div className={Menu.label}>New</div>
</a>
<a>
<div className={`${Menu.icon} ${Menu.notifications}`}/>
<div className={Menu.label}>Notifications</div>
</a>
<a className={Menu.active}>
<div className={`${Menu.icon} ${Menu.profile}`}/>
<div className={Menu.label}>Profile</div>
</a>
</nav>

hello
<Header active={'profile'} />

aaa
</div>
@@ -14,7 +14,7 @@ import Metatags from "../components/metatags"
/>

<div className={Menu.container}>
<Header />
<Header active={'home'} />
<div className={Menu.posts}>
<Image
account="brettjay"

0 comments on commit 3f93b8f

Please sign in to comment.
You can’t perform that action at this time.