breakout theme to file

This commit is contained in:
Barry Gitarts 2019-11-18 12:11:32 -05:00 committed by Barry G
parent 6178061e6c
commit 27ffdf1fa3
2 changed files with 27 additions and 25 deletions

View File

@ -1,37 +1,14 @@
import React, { StrictMode } from 'react';
import { unstable_createRoot as createRoot} from 'react-dom';
import DatabaseProvider from '@nozbe/watermelondb/DatabaseProvider';
import {MuiThemeProvider, createMuiTheme} from '@material-ui/core/styles';
import {MuiThemeProvider} from '@material-ui/core/styles';
import theme from './theme';
import database from './db';
import App from './dapp';
import * as serviceWorker from './serviceWorker';
import './css/fonts/Inter/inter.css'
const theme = createMuiTheme({
typography: {
useNextVariants: true,
fontFamily: ['Inter', '-apple-system', 'BlinkMacSystemFont', "Segoe UI", 'Roboto', "Helvetica Neue", 'Arial', "Noto Sans", 'sans-serif', "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"].join(','),
},
breakpoints: {
values: {
md: 860
}
},
palette: {
primary: { 500: '#4360DF' },
common: {
grey: '#F5F7F8'
},
text: {
grey: '#939BA1'
},
action: {
disabledBackground: '#FAFAFA'
}
}
});
createRoot(document.getElementById('app')).render(
<DatabaseProvider database={database}>
<MuiThemeProvider theme={theme}>

25
src/theme.js Normal file
View File

@ -0,0 +1,25 @@
import { createMuiTheme } from '@material-ui/core/styles';
export default createMuiTheme({
typography: {
useNextVariants: true,
fontFamily: ['Inter', '-apple-system', 'BlinkMacSystemFont', "Segoe UI", 'Roboto', "Helvetica Neue", 'Arial', "Noto Sans", 'sans-serif', "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"].join(','),
},
breakpoints: {
values: {
md: 860
}
},
palette: {
primary: { 500: '#1AA56E' },
common: {
grey: '#F5F7F8'
},
text: {
grey: '#939BA1'
},
action: {
disabledBackground: '#FAFAFA'
}
}
});