Created
August 2, 2019 18:30
-
-
Save onimenotsuki/f8ba8a1b02f99b0e755ca0acbcadaae9 to your computer and use it in GitHub Desktop.
Layout inicial para remover margen con emotion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Layout component that queries for data | |
* with Gatsby's useStaticQuery component | |
* | |
* See: https://www.gatsbyjs.org/docs/use-static-query/ | |
*/ | |
import React from 'react'; | |
import PropTypes from 'prop-types'; | |
import { useStaticQuery, graphql } from 'gatsby'; | |
import { Global, css } from '@emotion/core'; | |
import Header from './header'; | |
import '../styles/sass-components/layoud-grid.scss'; | |
const Layout = ({ children }) => { | |
const data = useStaticQuery(graphql` | |
query SiteTitleQuery { | |
site { | |
siteMetadata { | |
title | |
} | |
} | |
} | |
`); | |
return ( | |
<> | |
<Global | |
styles={css`body { margin: 0; }`} | |
/> | |
<Header siteTitle={data.site.siteMetadata.title} /> | |
{children} | |
</> | |
); | |
}; | |
Layout.propTypes = { | |
children: PropTypes.node.isRequired, | |
}; | |
export default Layout; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment