Add darkTheme to App
This commit is contained in:
+14
-3
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user