Skip to content

Commit

Permalink
feat: introduce header file
Browse files Browse the repository at this point in the history
BREAKING CHANGE: intro split into header and intro component.
GridTemplateArea is now called header instead of intro.
  • Loading branch information
Pyrax committed Aug 10, 2020
1 parent 2dd321c commit 8ab0ec0
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
Binary file modified .github/static/images/theme-preview.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 6 additions & 4 deletions gatsby-theme-contact/src/components/contact-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import React from 'react'
import { jsx } from 'theme-ui'

import Layout from './layout'
import Header from './header'
import Intro from './intro'
import Form from './form'
import Details from './details'
Expand All @@ -18,22 +19,23 @@ const ContactPage = () => (
gridTemplateRows: [`auto`],
gridTemplateAreas: [
`
"intro"
"header"
"form"
"details"
`,
null,
`
"intro intro"
"header header"
"form details"
`
]
}}
>
<div sx={{ gridArea: `intro`, mb: [1, null, 3] }}>
<Intro />
<div sx={{ gridArea: `header`, mb: [1, null, 3] }}>
<Header />
</div>
<div sx={{ gridArea: `form`, pr: [0, null, 5] }}>
<Intro />
<Form />
</div>
<aside
Expand Down
10 changes: 10 additions & 0 deletions gatsby-theme-contact/src/components/header.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from 'react'
import { Styled } from 'theme-ui'

const Header = () => (
<>
<Styled.h2>Get in touch</Styled.h2>
</>
)

export default Header
1 change: 0 additions & 1 deletion gatsby-theme-contact/src/components/intro.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Styled } from 'theme-ui'

const Intro = () => (
<>
<Styled.h2>Get in touch</Styled.h2>
<Styled.p>
If you want to get in touch for your next project or you still have
questions left, do not hesitate to start a chat.
Expand Down

0 comments on commit 8ab0ec0

Please sign in to comment.