Skip to content

Commit

Permalink
🔧 configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
ABSphreak committed Oct 11, 2020
1 parent b9b1049 commit ac36625
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 1 deletion.
21 changes: 21 additions & 0 deletions gatsby-browser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import React from "react"
import { createGlobalStyle } from "styled-components"

const GlobalStyles = createGlobalStyle`
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body, html {
font-family: "Inter", sans-serif;
height: 100%;
}
`

export const wrapRootElement = ({ element }) => (
<>
<GlobalStyles />
{element}
</>
)
14 changes: 13 additions & 1 deletion gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,17 @@

module.exports = {
/* Your site config here */
plugins: [],
plugins: [
`gatsby-plugin-styled-components`,
{
resolve: `gatsby-plugin-prefetch-google-fonts`,
options: {
fonts: [
{
family: `Inter`,
},
],
},
},
],
}
21 changes: 21 additions & 0 deletions gatsby-ssr.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import React from "react"
import { createGlobalStyle } from "styled-components"

const GlobalStyles = createGlobalStyle`
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body, html {
font-family: "Inter", sans-serif;
height: 100%;
}
`

export const wrapRootElement = ({ element }) => (
<>
<GlobalStyles />
{element}
</>
)

0 comments on commit ac36625

Please sign in to comment.