From bd778144d6140acb189ecb4d080851318331ac00 Mon Sep 17 00:00:00 2001 From: Josue Date: Tue, 9 Mar 2021 11:29:09 -0500 Subject: [PATCH] refactor: use const for colours and override default styles --- striker-ui/theme/index.ts | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/striker-ui/theme/index.ts b/striker-ui/theme/index.ts index b254ec6d..7c9605aa 100644 --- a/striker-ui/theme/index.ts +++ b/striker-ui/theme/index.ts @@ -1,20 +1,25 @@ 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({ palette: { primary: { - main: '#343434', - light: '#3E78B2', + main: PANEL_BACKGROUND, }, secondary: { - main: '#343434', + main: TEXT, }, background: { paper: PANEL_BACKGROUND, }, }, typography: { + fontFamily: 'Roboto', fontSize: 14, }, overrides: { @@ -24,8 +29,14 @@ const theme: Theme = createMuiTheme({ }, track: { borderRadius: 0, + backgroundColor: PURPLE_OFF, + '$checked$checked + &': { + // Controls checked color for the track + backgroundColor: RED_ON, + }, }, thumb: { + color: TEXT, borderRadius: 0, }, },