laconic-console/src/theme.js

98 lines
2.1 KiB
JavaScript
Raw Permalink Normal View History

2020-05-23 23:01:17 +00:00
//
2020-06-23 14:19:01 +00:00
// Copyright 2019 DXOS.org
2020-05-23 23:01:17 +00:00
//
2024-08-09 02:03:52 +00:00
import { createTheme as createMuiTheme } from "@material-ui/core/styles";
import teal from "@material-ui/core/colors/teal";
import orange from "@material-ui/core/colors/orange";
2020-05-23 23:01:17 +00:00
2024-08-09 02:03:52 +00:00
export const createTheme = (theme) =>
createMuiTheme({
// https://material-ui.com/system/shadows
shadows: ["none"],
2020-05-23 23:01:17 +00:00
2024-08-09 02:03:52 +00:00
// https://stackoverflow.com/questions/60567673/reactjs-material-ui-theme-mixins-toolbar-offset-is-not-adapting-when-toolbar
mixins: {
denseToolbar: {
height: 48,
},
2020-05-25 22:32:45 +00:00
},
2024-08-09 02:03:52 +00:00
// https://material-ui.com/customization/globals/#default-props
props: {
MuiButtonBase: {
disableRipple: true,
},
MuiButton: {
size: "small",
},
MuiFilledInput: {
margin: "dense",
},
MuiFormControl: {
margin: "dense",
},
MuiFormHelperText: {
margin: "dense",
},
MuiIconButton: {
size: "small",
},
MuiInputBase: {
margin: "dense",
},
MuiInputLabel: {
margin: "dense",
},
MuiTable: {
size: "small",
},
MuiTextField: {
margin: "dense",
},
MuiToolbar: {
variant: "dense",
},
2020-05-25 22:32:45 +00:00
},
2020-05-23 23:01:17 +00:00
2024-08-09 02:03:52 +00:00
// https://material-ui.com/customization/palette/
palette:
theme === "dark"
? {
type: "dark",
primary: {
main: "#0000F4",
},
2024-08-09 03:44:45 +00:00
secondary: {
main: "#A2A2FF",
},
2024-08-09 02:03:52 +00:00
background: {
default: "#0F0F0F",
2024-08-09 02:03:52 +00:00
secondary: "#18181A",
paper: "#18181A",
},
2024-08-09 02:24:20 +00:00
text: {
primary: "#FBFBFB",
secondary: "#BDBCC3",
lineLabel: "#A2A2FF",
2024-08-09 02:24:20 +00:00
},
2024-08-09 02:03:52 +00:00
}
: {
primary: teal,
},
2020-05-23 23:01:17 +00:00
2024-08-09 02:03:52 +00:00
// https://material-ui.com/customization/theming/#theme-configuration-variables
2020-05-23 23:01:17 +00:00
2024-08-09 02:03:52 +00:00
// https://material-ui.com/customization/globals/
overrides: {
MuiCssBaseline: {
"@global": {
body: {
margin: 0,
overflow: "hidden",
},
},
},
},
});