anvil/striker-ui/theme/index.ts

61 lines
1.2 KiB
TypeScript
Raw Normal View History

2021-03-08 16:27:52 +00:00
import createMuiTheme, { Theme } from '@material-ui/core/styles/createMuiTheme';
import {
PANEL_BACKGROUND,
TEXT,
PURPLE,
BLUE,
DISABLED,
BORDER_RADIUS,
} from '../lib/consts/DEFAULT_THEME';
import 'typeface-roboto-condensed';
2021-03-08 16:27:52 +00:00
const theme: Theme = createMuiTheme({
palette: {
primary: {
main: PANEL_BACKGROUND,
2021-03-08 16:27:52 +00:00
},
secondary: {
main: TEXT,
2021-03-08 16:27:52 +00:00
},
background: {
paper: PANEL_BACKGROUND,
},
},
typography: {
2021-03-10 17:54:24 +00:00
fontFamily: 'Roboto Condensed',
fontWeightRegular: 200,
2021-03-08 16:27:52 +00:00
fontSize: 14,
},
overrides: {
MuiSwitch: {
2021-03-22 15:30:36 +00:00
switchBase: {
// Controls default (unchecked) color for the thumb
color: TEXT,
2021-03-22 15:30:36 +00:00
},
2021-03-08 16:27:52 +00:00
root: {
padding: 8,
},
track: {
borderRadius: BORDER_RADIUS,
2021-03-22 15:30:36 +00:00
border: 3,
backgroundColor: PURPLE,
opacity: 1,
'$checked$checked + &': {
// Controls checked color for the track
backgroundColor: BLUE,
2021-03-22 15:30:36 +00:00
opacity: 1,
},
'$disabled$disabled + &': {
backgroundColor: DISABLED,
},
2021-03-08 16:27:52 +00:00
},
thumb: {
color: TEXT,
borderRadius: BORDER_RADIUS,
2021-03-08 16:27:52 +00:00
},
},
},
});
export default theme;