Add light theme

This commit is contained in:
Thomas Nordquist
2019-04-03 06:09:34 +02:00
parent acbaced1ec
commit 6853066a19
18 changed files with 166 additions and 93 deletions

View File

@@ -9,6 +9,16 @@ import { batchDispatchMiddleware } from 'redux-batched-actions'
import { createMuiTheme, MuiThemeProvider, Theme } from '@material-ui/core/styles'
import { Provider, connect } from 'react-redux'
import './tracking'
import blue from '@material-ui/core/colors/blue'
import red from '@material-ui/core/colors/red'
import pink from '@material-ui/core/colors/pink'
import orange from '@material-ui/core/colors/orange'
import deepOrange from '@material-ui/core/colors/deepOrange'
import indigo from '@material-ui/core/colors/indigo'
import lime from '@material-ui/core/colors/lime'
import green from '@material-ui/core/colors/green'
import teal from '@material-ui/core/colors/teal'
import amber from '@material-ui/core/colors/amber'
const composeEnhancers = /*(window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || */ compose
const store = createStore(
@@ -21,14 +31,6 @@ const store = createStore(
),
)
setTimeout(() => {
const splash = document.getElementById('splash')
if (splash) {
splash.style.animation = 'unsplash 0.5s ease-in 0s 1 normal forwards'
setTimeout(() => splash.remove(), 600)
}
}, 300)
function createTheme(type: 'light' | 'dark') {
if (type === 'dark') {
return createMuiTheme({
@@ -40,6 +42,15 @@ function createTheme(type: 'light' | 'dark') {
return createMuiTheme({
palette: {
type: 'light',
background: {
default: '#fafafa',
},
primary: teal,
secondary: amber,
// error: red,
action: {
disabledBackground: '#fafafa',
},
},
})
}