summaryrefslogtreecommitdiff
path: root/@linaria/examples/gatsby/plugin/src/components/header.js
diff options
context:
space:
mode:
Diffstat (limited to '@linaria/examples/gatsby/plugin/src/components/header.js')
-rw-r--r--@linaria/examples/gatsby/plugin/src/components/header.js42
1 files changed, 42 insertions, 0 deletions
diff --git a/@linaria/examples/gatsby/plugin/src/components/header.js b/@linaria/examples/gatsby/plugin/src/components/header.js
new file mode 100644
index 0000000..8990b7e
--- /dev/null
+++ b/@linaria/examples/gatsby/plugin/src/components/header.js
@@ -0,0 +1,42 @@
+import { Link } from "gatsby"
+import PropTypes from "prop-types"
+import React from "react"
+
+const Header = ({ siteTitle }) => (
+ <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