diff options
Diffstat (limited to 'modern/src/common/theme')
-rw-r--r-- | modern/src/common/theme/components.js | 40 | ||||
-rw-r--r-- | modern/src/common/theme/dimensions.js | 14 | ||||
-rw-r--r-- | modern/src/common/theme/index.js | 11 | ||||
-rw-r--r-- | modern/src/common/theme/palette.js | 22 |
4 files changed, 0 insertions, 87 deletions
diff --git a/modern/src/common/theme/components.js b/modern/src/common/theme/components.js deleted file mode 100644 index 56a2ac75..00000000 --- a/modern/src/common/theme/components.js +++ /dev/null @@ -1,40 +0,0 @@ -export default { - MuiUseMediaQuery: { - defaultProps: { - noSsr: true, - }, - }, - MuiOutlinedInput: { - styleOverrides: { - root: ({ theme }) => ({ - backgroundColor: theme.palette.background.default, - }), - }, - }, - MuiButton: { - styleOverrides: { - sizeMedium: { - height: '40px', - }, - }, - }, - MuiFormControl: { - defaultProps: { - size: 'small', - }, - }, - MuiSnackbar: { - defaultProps: { - anchorOrigin: { - vertical: 'bottom', - horizontal: 'center', - }, - }, - }, - MuiTooltip: { - defaultProps: { - enterDelay: 500, - enterNextDelay: 500, - }, - }, -}; diff --git a/modern/src/common/theme/dimensions.js b/modern/src/common/theme/dimensions.js deleted file mode 100644 index 4930803a..00000000 --- a/modern/src/common/theme/dimensions.js +++ /dev/null @@ -1,14 +0,0 @@ -export default { - sidebarWidth: '28%', - sidebarWidthTablet: '52px', - drawerWidthDesktop: '360px', - drawerWidthTablet: '320px', - drawerHeightPhone: '250px', - filterFormWidth: '160px', - eventsDrawerWidth: '320px', - bottomBarHeight: 56, - popupMapOffset: 300, - popupMaxWidth: 288, - popupImageHeight: 144, - cardContentMaxHeight: '40vh', -}; diff --git a/modern/src/common/theme/index.js b/modern/src/common/theme/index.js deleted file mode 100644 index e8ce698b..00000000 --- a/modern/src/common/theme/index.js +++ /dev/null @@ -1,11 +0,0 @@ -import { useMemo } from 'react'; -import { createTheme } from '@mui/material/styles'; -import palette from './palette'; -import dimensions from './dimensions'; -import components from './components'; - -export default (server, darkMode) => useMemo(() => createTheme({ - palette: palette(server, darkMode), - dimensions, - components, -}), [server, darkMode]); diff --git a/modern/src/common/theme/palette.js b/modern/src/common/theme/palette.js deleted file mode 100644 index f32ed93e..00000000 --- a/modern/src/common/theme/palette.js +++ /dev/null @@ -1,22 +0,0 @@ -import { grey, green, indigo } from '@mui/material/colors'; - -const validatedColor = (color) => (/^#([0-9A-Fa-f]{3}){1,2}$/.test(color) ? color : null); - -export default (server, darkMode) => ({ - mode: darkMode ? 'dark' : 'light', - background: { - default: darkMode ? grey[900] : grey[50], - }, - primary: { - main: validatedColor(server?.attributes?.colorPrimary) || (darkMode ? indigo[200] : indigo[900]), - }, - secondary: { - main: validatedColor(server?.attributes?.colorSecondary) || (darkMode ? green[200] : green[800]), - }, - neutral: { - main: grey[500], - }, - geometry: { - main: '#3bb2d0', - }, -}); |