rsnext/examples/with-styled-components-babel/pages/_app.tsx
2022-11-22 14:33:29 +01:00

33 lines
583 B
TypeScript

import type { AppProps } from 'next/app'
import { createGlobalStyle, ThemeProvider } from 'styled-components'
const GlobalStyle = createGlobalStyle`
body {
margin: 0;
padding: 0;
box-sizing: border-box;
}
`
interface ThemeInterface {
colors: {
primary: string
}
}
const theme: ThemeInterface = {
colors: {
primary: '#0070f3',
},
}
export default function App({ Component, pageProps }: AppProps) {
return (
<>
<GlobalStyle />
<ThemeProvider theme={theme}>
<Component {...pageProps} />
</ThemeProvider>
</>
)
}