Skip to content

Instantly share code, notes, and snippets.

@onimenotsuki
Created August 2, 2019 18:30
Show Gist options
  • Save onimenotsuki/f8ba8a1b02f99b0e755ca0acbcadaae9 to your computer and use it in GitHub Desktop.
Save onimenotsuki/f8ba8a1b02f99b0e755ca0acbcadaae9 to your computer and use it in GitHub Desktop.
Layout inicial para remover margen con emotion
/**
* 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