Skip to content

Instantly share code, notes, and snippets.

@bogdanq
Last active December 31, 2019 09:40
Show Gist options
  • Save bogdanq/9b7132ad7540b6f4e5b8d578e5c1cc8a to your computer and use it in GitHub Desktop.
Save bogdanq/9b7132ad7540b6f4e5b8d578e5c1cc8a to your computer and use it in GitHub Desktop.
const GenericTemplate = ({ children, hero }) => {
return (
<Container>
<Header />
{hero}
{children}
<Footer />
</Container>
)
}
//usage example
const MainTemplate = ({ children, hero }) => (
<GenericTemplate hero={hero} children={children} />
)
const ChatTemplate = ({ children }) => (
<GenericTemplate children={children} />
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment