header.js 721 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import { Link } from "gatsby"
  2. import PropTypes from "prop-types"
  3. import React from "react"
  4. const Header = ({ siteTitle }) => (
  5. <header
  6. style={{
  7. background: `rebeccapurple`,
  8. marginBottom: `1.45rem`,
  9. }}
  10. >
  11. <div
  12. style={{
  13. margin: `0 auto`,
  14. maxWidth: 960,
  15. padding: `1.45rem 1.0875rem`,
  16. }}
  17. >
  18. <h1 style={{ margin: 0 }}>
  19. <Link
  20. to="/"
  21. style={{
  22. color: `white`,
  23. textDecoration: `none`,
  24. }}
  25. >
  26. {siteTitle}
  27. </Link>
  28. </h1>
  29. </div>
  30. </header>
  31. )
  32. Header.propTypes = {
  33. siteTitle: PropTypes.string,
  34. }
  35. Header.defaultProps = {
  36. siteTitle: ``,
  37. }
  38. export default Header