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 UNSELECTED = '#666';
export const DIVIDER = '#888'; export const DIVIDER = '#888';
export const SELECTED_ANVIL = '#00ff00'; export const SELECTED_ANVIL = '#00ff00';
export const DISABLED = '#AAA';

@ -4,6 +4,7 @@ import {
TEXT, TEXT,
PURPLE, PURPLE,
BLUE, BLUE,
DISABLED,
} from '../lib/consts/DEFAULT_THEME'; } from '../lib/consts/DEFAULT_THEME';
const theme: Theme = createMuiTheme({ const theme: Theme = createMuiTheme({
@ -27,26 +28,28 @@ const theme: Theme = createMuiTheme({
MuiSwitch: { MuiSwitch: {
switchBase: { switchBase: {
// Controls default (unchecked) color for the thumb // Controls default (unchecked) color for the thumb
color: '#fff', color: TEXT,
}, },
root: { root: {
padding: 8, padding: 8,
}, },
track: { track: {
borderRadius: 0, borderRadius: 3,
border: 3, border: 3,
backgroundColor: PURPLE, backgroundColor: PURPLE,
opacity: 1,
'$checked$checked + &': { '$checked$checked + &': {
// Controls checked color for the track // Controls checked color for the track
backgroundColor: BLUE, backgroundColor: BLUE,
},
'&$checked + $track': {
opacity: 1, opacity: 1,
}, },
'$disabled$disabled + &': {
backgroundColor: DISABLED,
},
}, },
thumb: { thumb: {
color: TEXT, color: TEXT,
borderRadius: 0, borderRadius: 3,
}, },
}, },
}, },

Loading…
Cancel
Save