Adding globalStyled with styled components (#16783)

Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
This commit is contained in:
Arthur Maverick 2020-09-10 17:05:59 -03:00 committed by GitHub
parent 47d983f71f
commit 91b4a2b37e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,12 @@
import { ThemeProvider } from 'styled-components'
import { createGlobalStyle, ThemeProvider } from 'styled-components'
const GlobalStyle = createGlobalStyle`
body {
margin: 0;
padding: 0;
box-sizing: border-box;
}
`
const theme = {
colors: {
@ -8,8 +16,11 @@ const theme = {
export default function App({ Component, pageProps }) {
return (
<ThemeProvider theme={theme}>
<Component {...pageProps} />
</ThemeProvider>
<>
<GlobalStyle />
<ThemeProvider theme={theme}>
<Component {...pageProps} />
</ThemeProvider>
</>
)
}