Skip to content

Instantly share code, notes, and snippets.

@afucher
Created September 5, 2019 15:33
Show Gist options
  • Save afucher/55d1449060a3eeafd1c067d47cdca3d9 to your computer and use it in GitHub Desktop.
Save afucher/55d1449060a3eeafd1c067d47cdca3d9 to your computer and use it in GitHub Desktop.
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