diff options
author | 2021-12-13 02:07:04 +0100 | |
---|---|---|
committer | 2021-12-14 02:14:23 +0100 | |
commit | a96c52b21e7e590bbdd70b80896780a446fa2e8b (patch) | |
tree | 663619baa254577bb2f5342192e80bca692ad91d /subprojects/frontend/src/theme/ThemeProvider.tsx | |
parent | build: move modules into subproject directory (diff) | |
download | refinery-a96c52b21e7e590bbdd70b80896780a446fa2e8b.tar.gz refinery-a96c52b21e7e590bbdd70b80896780a446fa2e8b.tar.zst refinery-a96c52b21e7e590bbdd70b80896780a446fa2e8b.zip |
build: separate module for frontend
This allows us to simplify the webpack configuration and the gradle
build scripts.
Diffstat (limited to 'subprojects/frontend/src/theme/ThemeProvider.tsx')
-rw-r--r-- | subprojects/frontend/src/theme/ThemeProvider.tsx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/subprojects/frontend/src/theme/ThemeProvider.tsx b/subprojects/frontend/src/theme/ThemeProvider.tsx new file mode 100644 index 00000000..f5b50be1 --- /dev/null +++ b/subprojects/frontend/src/theme/ThemeProvider.tsx | |||
@@ -0,0 +1,15 @@ | |||
1 | import { observer } from 'mobx-react-lite'; | ||
2 | import { ThemeProvider as MaterialUiThemeProvider } from '@mui/material/styles'; | ||
3 | import React from 'react'; | ||
4 | |||
5 | import { useRootStore } from '../RootStore'; | ||
6 | |||
7 | export const ThemeProvider: React.FC = observer(({ children }) => { | ||
8 | const { themeStore } = useRootStore(); | ||
9 | |||
10 | return ( | ||
11 | <MaterialUiThemeProvider theme={themeStore.materialUiTheme}> | ||
12 | {children} | ||
13 | </MaterialUiThemeProvider> | ||
14 | ); | ||
15 | }); | ||