diff options
author | 2021-09-17 19:10:19 +0200 | |
---|---|---|
committer | 2021-09-17 19:10:19 +0200 | |
commit | efdb6c6620e9ea7f5861efbef7d3462bf3c7bcd7 (patch) | |
tree | c623e8b3fba326dcbb57228f1ddbfbf55eeec494 /language-web/src/main/js/index.tsx | |
parent | Add ESLint config (diff) | |
download | refinery-efdb6c6620e9ea7f5861efbef7d3462bf3c7bcd7.tar.gz refinery-efdb6c6620e9ea7f5861efbef7d3462bf3c7bcd7.tar.zst refinery-efdb6c6620e9ea7f5861efbef7d3462bf3c7bcd7.zip |
Frontend color theme
Diffstat (limited to 'language-web/src/main/js/index.tsx')
-rw-r--r-- | language-web/src/main/js/index.tsx | 32 |
1 files changed, 8 insertions, 24 deletions
diff --git a/language-web/src/main/js/index.tsx b/language-web/src/main/js/index.tsx index 24f0b69d..1f08feeb 100644 --- a/language-web/src/main/js/index.tsx +++ b/language-web/src/main/js/index.tsx | |||
@@ -2,11 +2,11 @@ import { CacheProvider } from '@emotion/react'; | |||
2 | import React from 'react'; | 2 | import React from 'react'; |
3 | import { render } from 'react-dom'; | 3 | import { render } from 'react-dom'; |
4 | import CssBaseline from '@material-ui/core/CssBaseline'; | 4 | import CssBaseline from '@material-ui/core/CssBaseline'; |
5 | import { ThemeProvider, createTheme } from '@material-ui/core/styles'; | ||
6 | import { getCache } from 'tss-react/cache'; | 5 | import { getCache } from 'tss-react/cache'; |
7 | 6 | ||
8 | import { App } from './App'; | 7 | import { App } from './App'; |
9 | import { RootStore, RootStoreProvider } from './RootStore'; | 8 | import { RootStore, RootStoreProvider } from './RootStore'; |
9 | import { ThemeProvider } from './theme/ThemeProvider'; | ||
10 | 10 | ||
11 | import '../css/index.scss'; | 11 | import '../css/index.scss'; |
12 | 12 | ||
@@ -49,31 +49,15 @@ scope Family = 1, Person += 5..10. | |||
49 | const rootStore = new RootStore(); | 49 | const rootStore = new RootStore(); |
50 | rootStore.editorStore.updateValue(initialValue); | 50 | rootStore.editorStore.updateValue(initialValue); |
51 | 51 | ||
52 | const theme = createTheme({ | ||
53 | palette: { | ||
54 | mode: 'dark', | ||
55 | background: { | ||
56 | default: '#212121', | ||
57 | paper: '#2f2f2f', | ||
58 | }, | ||
59 | primary: { | ||
60 | main: '#82aaff', | ||
61 | }, | ||
62 | secondary: { | ||
63 | main: '#ff5370', | ||
64 | }, | ||
65 | }, | ||
66 | }); | ||
67 | |||
68 | const app = ( | 52 | const app = ( |
69 | <CacheProvider value={getCache()}> | 53 | <RootStoreProvider rootStore={rootStore}> |
70 | <ThemeProvider theme={theme}> | 54 | <CacheProvider value={getCache()}> |
71 | <CssBaseline /> | 55 | <ThemeProvider> |
72 | <RootStoreProvider rootStore={rootStore}> | 56 | <CssBaseline /> |
73 | <App /> | 57 | <App /> |
74 | </RootStoreProvider> | 58 | </ThemeProvider> |
75 | </ThemeProvider> | 59 | </CacheProvider> |
76 | </CacheProvider> | 60 | </RootStoreProvider> |
77 | ); | 61 | ); |
78 | 62 | ||
79 | render(app, document.getElementById('app')); | 63 | render(app, document.getElementById('app')); |