Add darkTheme to App

This commit is contained in:
2020-12-12 03:26:40 +01:00
parent 5ae3a3fc54
commit 8842a7c89e
+14 -3
View File
@@ -1,9 +1,20 @@
import React from 'react' import React from 'react'
import PropTypes from 'prop-types' import PropTypes from 'prop-types'
import Head from 'next/head' import Head from 'next/head'
import {ThemeProvider} from '@material-ui/core/styles' import {createMuiTheme, ThemeProvider} from '@material-ui/core/styles'
import CssBaseline from '@material-ui/core/CssBaseline' import CssBaseline from '@material-ui/core/CssBaseline'
import theme from '../src/theme'
const darkTheme = createMuiTheme({
palette: {
type: 'dark',
primary: {
light: '#81c784',
main: '#4caf50',
dark: '#388e3c',
contrastText: '#fff'
}
}
})
export default function MyApp(props) { export default function MyApp(props) {
const {Component, pageProps} = props const {Component, pageProps} = props
@@ -36,7 +47,7 @@ export default function MyApp(props) {
<meta property='og:image:height' content='315' /> <meta property='og:image:height' content='315' />
<meta property='og:image:alt' content='Logo #OKi - Organisation KA Internationale' /> <meta property='og:image:alt' content='Logo #OKi - Organisation KA Internationale' />
</Head> </Head>
<ThemeProvider theme={theme}> <ThemeProvider theme={darkTheme}>
<CssBaseline /> <CssBaseline />
<Component {...pageProps} /> <Component {...pageProps} />
</ThemeProvider> </ThemeProvider>