You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

151 line
2.7KB

  1. import { ThemeProvider, createTheme } from "@mui/material";
  2. import { HasChildren } from "@types";
  3. let theme = createTheme({
  4. palette: {
  5. primary: {
  6. light: "#63ccff",
  7. main: "#009be5",
  8. dark: "#006db3",
  9. },
  10. },
  11. typography: {
  12. h5: {
  13. fontWeight: 500,
  14. fontSize: 26,
  15. letterSpacing: 0.5,
  16. },
  17. },
  18. shape: {
  19. borderRadius: 8,
  20. },
  21. components: {
  22. MuiTab: {
  23. defaultProps: {
  24. disableRipple: true,
  25. },
  26. },
  27. },
  28. mixins: {
  29. toolbar: {
  30. minHeight: 48,
  31. },
  32. },
  33. });
  34. theme = {
  35. ...theme,
  36. components: {
  37. MuiDrawer: {
  38. styleOverrides: {
  39. paper: {
  40. backgroundColor: "#081627",
  41. },
  42. },
  43. },
  44. MuiButton: {
  45. styleOverrides: {
  46. root: {
  47. textTransform: "none",
  48. },
  49. contained: {
  50. boxShadow: "none",
  51. "&:active": {
  52. boxShadow: "none",
  53. },
  54. },
  55. },
  56. },
  57. MuiTabs: {
  58. styleOverrides: {
  59. root: {
  60. marginLeft: theme.spacing(1),
  61. },
  62. indicator: {
  63. height: 3,
  64. borderTopLeftRadius: 3,
  65. borderTopRightRadius: 3,
  66. backgroundColor: theme.palette.common.white,
  67. },
  68. },
  69. },
  70. MuiTab: {
  71. styleOverrides: {
  72. root: {
  73. textTransform: "none",
  74. margin: "0 16px",
  75. minWidth: 0,
  76. padding: 0,
  77. [theme.breakpoints.up("md")]: {
  78. padding: 0,
  79. minWidth: 0,
  80. },
  81. },
  82. },
  83. },
  84. MuiIconButton: {
  85. styleOverrides: {
  86. root: {
  87. padding: theme.spacing(1),
  88. },
  89. },
  90. },
  91. MuiTooltip: {
  92. styleOverrides: {
  93. tooltip: {
  94. borderRadius: 4,
  95. },
  96. },
  97. },
  98. MuiDivider: {
  99. styleOverrides: {
  100. root: {
  101. backgroundColor: "rgb(255,255,255,0.15)",
  102. },
  103. },
  104. },
  105. MuiListItemButton: {
  106. styleOverrides: {
  107. root: {
  108. "&.Mui-selected": {
  109. color: "#4fc3f7",
  110. },
  111. },
  112. },
  113. },
  114. MuiListItemText: {
  115. styleOverrides: {
  116. primary: {
  117. fontSize: 14,
  118. fontWeight: theme.typography.fontWeightMedium,
  119. },
  120. },
  121. },
  122. MuiListItemIcon: {
  123. styleOverrides: {
  124. root: {
  125. color: "inherit",
  126. minWidth: "auto",
  127. marginRight: theme.spacing(2),
  128. "& svg": {
  129. fontSize: 20,
  130. },
  131. },
  132. },
  133. },
  134. MuiAvatar: {
  135. styleOverrides: {
  136. root: {
  137. width: 32,
  138. height: 32,
  139. },
  140. },
  141. },
  142. },
  143. };
  144. type Props = HasChildren;
  145. export function AppThemeProvider({ children }: Props) {
  146. return <ThemeProvider theme={theme}>{children}</ThemeProvider>;
  147. }