Skip to content

Instantly share code, notes, and snippets.

@nazariyv
Created March 12, 2020 15:31
Show Gist options
  • Save nazariyv/4e0ea9a6a66344bfe19c5dedd295ef53 to your computer and use it in GitHub Desktop.
Save nazariyv/4e0ea9a6a66344bfe19c5dedd295ef53 to your computer and use it in GitHub Desktop.
header.jsx
import React from "react";
import {
HeaderNavigation,
ALIGN,
StyledNavigationList,
StyledNavigationItem
} from "baseui/header-navigation";
import { Button } from "baseui/button";
import { withRouter } from "react-router";
const Header = ({ history }) => {
return (
<HeaderNavigation>
<StyledNavigationList $align={ALIGN.left}>
<StyledNavigationItem>
<a
href="$"
style={{ textDecoration: "none", color: "black" }}
onClick={event => {
event.preventDefault();
history.push("/");
}}
>
Ethereum Private Escrow
</a>
</StyledNavigationItem>
</StyledNavigationList>
<StyledNavigationList $align={ALIGN.center} />
<StyledNavigationList $align={ALIGN.right}></StyledNavigationList>
<StyledNavigationList $align={ALIGN.right}>
<StyledNavigationItem>
<Button
onClick={event => {
event.preventDefault();
history.push("/how-it-works");
}}
>
Learn how it works
</Button>
</StyledNavigationItem>
</StyledNavigationList>
</HeaderNavigation>
);
};
export default withRouter(Header);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment