refactor: use const for colours and override default styles

main
Josue 4 years ago committed by Tsu-ba-me
parent 8f886ea0ca
commit bd778144d6
  1. 19
      striker-ui/theme/index.ts

@ -1,20 +1,25 @@
import createMuiTheme, { Theme } from '@material-ui/core/styles/createMuiTheme'; import createMuiTheme, { Theme } from '@material-ui/core/styles/createMuiTheme';
import { PANEL_BACKGROUND } from '../lib/consts/DEFAULT_THEME'; import {
PANEL_BACKGROUND,
TEXT,
PURPLE_OFF,
RED_ON,
} from '../lib/consts/DEFAULT_THEME';
const theme: Theme = createMuiTheme({ const theme: Theme = createMuiTheme({
palette: { palette: {
primary: { primary: {
main: '#343434', main: PANEL_BACKGROUND,
light: '#3E78B2',
}, },
secondary: { secondary: {
main: '#343434', main: TEXT,
}, },
background: { background: {
paper: PANEL_BACKGROUND, paper: PANEL_BACKGROUND,
}, },
}, },
typography: { typography: {
fontFamily: 'Roboto',
fontSize: 14, fontSize: 14,
}, },
overrides: { overrides: {
@ -24,8 +29,14 @@ const theme: Theme = createMuiTheme({
}, },
track: { track: {
borderRadius: 0, borderRadius: 0,
backgroundColor: PURPLE_OFF,
'$checked$checked + &': {
// Controls checked color for the track
backgroundColor: RED_ON,
},
}, },
thumb: { thumb: {
color: TEXT,
borderRadius: 0, borderRadius: 0,
}, },
}, },

Loading…
Cancel
Save