aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEug-VS <eug-vs@keemail.me>2020-01-27 13:32:50 +0300
committerEug-VS <eug-vs@keemail.me>2020-01-27 13:32:50 +0300
commit72e9ea60b82f95f858aa341b5c0b63e277f6779f (patch)
tree31c3e8d4c6d11515070e88518d6f1a9c9fd69763 /src
parent8a75fef7a7b68f82b745f7d73cbafdfb1f444825 (diff)
downloadreact-benzin-72e9ea60b82f95f858aa341b5c0b63e277f6779f.tar.gz
feat: export ThemeProvider instead of theme
Diffstat (limited to 'src')
-rw-r--r--src/lib/components/BenzinThemeProvider/BenzinThemeProvider.js (renamed from src/lib/theme.js)17
-rw-r--r--src/lib/index.js2
2 files changed, 15 insertions, 4 deletions
diff --git a/src/lib/theme.js b/src/lib/components/BenzinThemeProvider/BenzinThemeProvider.js
index 96ab00e..48eca72 100644
--- a/src/lib/theme.js
+++ b/src/lib/components/BenzinThemeProvider/BenzinThemeProvider.js
@@ -1,6 +1,8 @@
-import { createMuiTheme } from '@material-ui/core/styles'
+import React from 'react';
+import { createMuiTheme, ThemeProvider } from '@material-ui/core/styles'
-const theme = createMuiTheme({
+
+const benzinTheme = createMuiTheme({
palette: {
type: 'dark',
primary: {
@@ -23,4 +25,13 @@ const theme = createMuiTheme({
},
});
-export default theme;
+
+const BenzinThemeProvider = ({ children }) => (
+ <ThemeProvider theme={benzinTheme}>
+ {children}
+ </ThemeProvider>
+);
+
+
+export default BenzinThemeProvider;
+
diff --git a/src/lib/index.js b/src/lib/index.js
index a983a23..0476c34 100644
--- a/src/lib/index.js
+++ b/src/lib/index.js
@@ -2,4 +2,4 @@ export { default as Window } from './components/Window/Window';
export { default as Header } from './components/Header/Header';
export { default as ContentSection } from './components/ContentSection/ContentSection';
export { default as SmartList } from './components/SmartList/SmartList';
-export { default as theme } from './theme';
+export { default as BenzinThemeProvider } from './components/BenzinThemeProvider/BenzinThemeProvider';