From a2809556c1075a7e71b85a6511930f4fedfded7b Mon Sep 17 00:00:00 2001 From: Josue Date: Fri, 14 May 2021 15:41:40 -0400 Subject: [PATCH] style: add disable colour to pallete and include it in MUI style --- striker-ui/lib/consts/DEFAULT_THEME.ts | 1 + striker-ui/theme/index.ts | 13 ++++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/striker-ui/lib/consts/DEFAULT_THEME.ts b/striker-ui/lib/consts/DEFAULT_THEME.ts index 3cfdb2b3..249d34cb 100644 --- a/striker-ui/lib/consts/DEFAULT_THEME.ts +++ b/striker-ui/lib/consts/DEFAULT_THEME.ts @@ -11,3 +11,4 @@ export const HOVER = '#444'; export const UNSELECTED = '#666'; export const DIVIDER = '#888'; export const SELECTED_ANVIL = '#00ff00'; +export const DISABLED = '#AAA'; diff --git a/striker-ui/theme/index.ts b/striker-ui/theme/index.ts index 50449c4b..5ea8a5a6 100644 --- a/striker-ui/theme/index.ts +++ b/striker-ui/theme/index.ts @@ -4,6 +4,7 @@ import { TEXT, PURPLE, BLUE, + DISABLED, } from '../lib/consts/DEFAULT_THEME'; const theme: Theme = createMuiTheme({ @@ -27,26 +28,28 @@ const theme: Theme = createMuiTheme({ MuiSwitch: { switchBase: { // Controls default (unchecked) color for the thumb - color: '#fff', + color: TEXT, }, root: { padding: 8, }, track: { - borderRadius: 0, + borderRadius: 3, border: 3, backgroundColor: PURPLE, + opacity: 1, '$checked$checked + &': { // Controls checked color for the track backgroundColor: BLUE, - }, - '&$checked + $track': { opacity: 1, }, + '$disabled$disabled + &': { + backgroundColor: DISABLED, + }, }, thumb: { color: TEXT, - borderRadius: 0, + borderRadius: 3, }, }, },