31 lines
744 B
JavaScript
31 lines
744 B
JavaScript
import * as React from 'react'
|
|
import App, { Container } from 'next/app'
|
|
import { getTokens } from '@kiwicom/orbit-components'
|
|
import { ThemeProvider, createGlobalStyle } from 'styled-components'
|
|
|
|
const GlobalStyle = createGlobalStyle`
|
|
body {
|
|
width: 100vw;
|
|
height: 100vh;
|
|
margin: 0 auto;
|
|
background-color: ${({ theme }) => theme.orbit.paletteCloudLight};
|
|
}
|
|
`
|
|
|
|
const tokens = getTokens()
|
|
|
|
export default class MyApp extends App {
|
|
render () {
|
|
const { Component, pageProps } = this.props
|
|
return (
|
|
<Container>
|
|
<ThemeProvider theme={{ orbit: tokens }}>
|
|
<>
|
|
<GlobalStyle />
|
|
<Component {...pageProps} />
|
|
</>
|
|
</ThemeProvider>
|
|
</Container>
|
|
)
|
|
}
|
|
}
|