diff options
-rw-r--r-- | src/lib/components/BenzinThemeProvider/BenzinThemeProvider.js (renamed from src/lib/theme.js) | 17 | ||||
-rw-r--r-- | src/lib/index.js | 2 |
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'; |