From 72e9ea60b82f95f858aa341b5c0b63e277f6779f Mon Sep 17 00:00:00 2001 From: Eug-VS Date: Mon, 27 Jan 2020 13:32:50 +0300 Subject: feat: export ThemeProvider instead of theme --- .../BenzinThemeProvider/BenzinThemeProvider.js | 37 ++++++++++++++++++++++ src/lib/index.js | 2 +- src/lib/theme.js | 26 --------------- 3 files changed, 38 insertions(+), 27 deletions(-) create mode 100644 src/lib/components/BenzinThemeProvider/BenzinThemeProvider.js delete mode 100644 src/lib/theme.js diff --git a/src/lib/components/BenzinThemeProvider/BenzinThemeProvider.js b/src/lib/components/BenzinThemeProvider/BenzinThemeProvider.js new file mode 100644 index 0000000..48eca72 --- /dev/null +++ b/src/lib/components/BenzinThemeProvider/BenzinThemeProvider.js @@ -0,0 +1,37 @@ +import React from 'react'; +import { createMuiTheme, ThemeProvider } from '@material-ui/core/styles' + + +const benzinTheme = createMuiTheme({ + palette: { + type: 'dark', + primary: { + main: '#ffa726', + }, + secondary: { + main: '#9c27b0', + }, + background: { + default: '#121212', + paper: '#1e1e1e', + elevation1: '#1e1e1e', + elevation2: '#232323', + elevation3: '#252525', + }, + text: { + primary: '#f4f4f4', + secondary: 'rgba(255, 255, 255, 0.6)', + } + }, +}); + + +const BenzinThemeProvider = ({ children }) => ( + + {children} + +); + + +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'; diff --git a/src/lib/theme.js b/src/lib/theme.js deleted file mode 100644 index 96ab00e..0000000 --- a/src/lib/theme.js +++ /dev/null @@ -1,26 +0,0 @@ -import { createMuiTheme } from '@material-ui/core/styles' - -const theme = createMuiTheme({ - palette: { - type: 'dark', - primary: { - main: '#ffa726', - }, - secondary: { - main: '#9c27b0', - }, - background: { - default: '#121212', - paper: '#1e1e1e', - elevation1: '#1e1e1e', - elevation2: '#232323', - elevation3: '#252525', - }, - text: { - primary: '#f4f4f4', - secondary: 'rgba(255, 255, 255, 0.6)', - } - }, -}); - -export default theme; -- cgit v1.2.3