style: add disable colour to pallete and include it in MUI style

main
Josue 4 years ago committed by Tsu-ba-me
parent 894558d177
commit a2809556c1
  1. 1
      striker-ui/lib/consts/DEFAULT_THEME.ts
  2. 13
      striker-ui/theme/index.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';

@ -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,
},
},
},

Loading…
Cancel
Save