diff options
Diffstat (limited to 'modern/src/theme')
-rw-r--r-- | modern/src/theme/dimensions.js | 6 | ||||
-rw-r--r-- | modern/src/theme/index.js | 12 | ||||
-rw-r--r-- | modern/src/theme/overrides.js | 49 | ||||
-rw-r--r-- | modern/src/theme/palette.js | 17 |
4 files changed, 84 insertions, 0 deletions
diff --git a/modern/src/theme/dimensions.js b/modern/src/theme/dimensions.js new file mode 100644 index 0000000..e36fc23 --- /dev/null +++ b/modern/src/theme/dimensions.js @@ -0,0 +1,6 @@ +export default { + inputHeight: '42px', + borderRadius: '4px', + sidebarWidth: '28%', + tabletSidebarWidth: '52px' +}; diff --git a/modern/src/theme/index.js b/modern/src/theme/index.js new file mode 100644 index 0000000..5a3b2a9 --- /dev/null +++ b/modern/src/theme/index.js @@ -0,0 +1,12 @@ +import { createMuiTheme } from '@material-ui/core/styles'; +import palette from './palette'; +import overrides from './overrides'; +import dimensions from './dimensions'; + +const theme = createMuiTheme({ + palette, + overrides, + dimensions +}); + +export default theme; diff --git a/modern/src/theme/overrides.js b/modern/src/theme/overrides.js new file mode 100644 index 0000000..c8d64a9 --- /dev/null +++ b/modern/src/theme/overrides.js @@ -0,0 +1,49 @@ +import dimensions from './dimensions'; + +export default { + MuiFormControl: { + root: { + height: dimensions.inputHeight, + } + }, + MuiInputLabel: { + filled: { + transform: 'translate(12px, 14px) scale(1)', + '&$shrink' :{ + transform: 'translate(12px, -12px) scale(0.75)' + } + }, + }, + MuiFilledInput: { + root: { + height: dimensions.inputHeight, + borderRadius: dimensions.borderRadius, + background: 'rgba(0, 0, 0, 0.035)', + }, + input: { + height: dimensions.inputHeight, + borderRadius: dimensions.borderRadius, + paddingTop: '10px', + boxSizing: 'border-box', + '&:-webkit-autofill': { + WebkitBoxShadow: '0 0 0 100px #eeeeee inset', + }, + }, + underline: { + "&:before": { + borderBottom: 'none', + }, + "&:after": { + borderBottom: 'none', + }, + "&:hover:before": { + borderBottom: 'none', + }, + } + }, + MuiButton: { + root: { + height: dimensions.inputHeight, + } + } +}; diff --git a/modern/src/theme/palette.js b/modern/src/theme/palette.js new file mode 100644 index 0000000..5c93cfd --- /dev/null +++ b/modern/src/theme/palette.js @@ -0,0 +1,17 @@ +const traccarPurple = '#333366'; +const traccarGreen = '#4CAF50'; +const traccarWhite = '#FFF'; + +export default { + common: { + purple: traccarPurple, + green: traccarGreen + }, + primary: { + main: traccarPurple + }, + secondary: { + main: traccarGreen, + contrastText: traccarWhite + } +}; |