From d6dfe3f446c10ba4ca0b3f247e171789bda119cf Mon Sep 17 00:00:00 2001 From: Jake Dexheimer Date: Sun, 23 Jul 2017 12:00:31 -0500 Subject: [PATCH] Add hero text toggle --- components/Header.js | 15 +++++++-------- components/Page.js | 4 ++-- pages/editor.js | 2 +- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/components/Header.js b/components/Header.js index 5737875..05f73fe 100644 --- a/components/Header.js +++ b/components/Header.js @@ -1,31 +1,30 @@ import React from 'react' import Logo from './svg/Logo' -const Header = (props) => ( -
+const Header = ({ enableHeroText }) => ( +
- -

The easiest way to create images from source code. Start typing, or drag a file into the text area to get started.

+ + { enableHeroText ? (

The easiest way to create images from source code.
Start typing, or drag a file into the text area to get started.

) : null }
diff --git a/components/Page.js b/components/Page.js index c5ecc4f..2269cf8 100644 --- a/components/Page.js +++ b/components/Page.js @@ -3,10 +3,10 @@ import Meta from './Meta' import Header from './Header' import Footer from './Footer' -export default ({ children }) => ( +export default ({ children, enableHeroText }) => (
-
+
{ children }
diff --git a/pages/editor.js b/pages/editor.js index 2463e22..d068bcc 100644 --- a/pages/editor.js +++ b/pages/editor.js @@ -59,7 +59,7 @@ class Editor extends React.Component { render () { return ( - + {/* TODO this doesn't update the render */} {