Created
September 5, 2019 15:33
-
-
Save afucher/55d1449060a3eeafd1c067d47cdca3d9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Link } from "gatsby" | |
import PropTypes from "prop-types" | |
import React, { useState } from "react" | |
const Header = ({ siteTitle }) => { | |
useState(false); | |
return ( | |
<header | |
style={{ | |
background: `rebeccapurple`, | |
marginBottom: `1.45rem`, | |
}} | |
> | |
<div | |
style={{ | |
margin: `0 auto`, | |
maxWidth: 960, | |
padding: `1.45rem 1.0875rem`, | |
}} | |
> | |
<h1 style={{ margin: 0 }}> | |
<Link | |
to="/" | |
style={{ | |
color: `white`, | |
textDecoration: `none`, | |
}} | |
> | |
{siteTitle} | |
</Link> | |
</h1> | |
</div> | |
</header> | |
)}; | |
Header.propTypes = { | |
siteTitle: PropTypes.string, | |
} | |
Header.defaultProps = { | |
siteTitle: ``, | |
} | |
export default Header |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment