aboutsummaryrefslogtreecommitdiff
path: root/modern/src/theme
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/theme')
-rw-r--r--modern/src/theme/dimensions.js7
-rw-r--r--modern/src/theme/index.js12
-rw-r--r--modern/src/theme/overrides.js48
-rw-r--r--modern/src/theme/palette.js19
4 files changed, 86 insertions, 0 deletions
diff --git a/modern/src/theme/dimensions.js b/modern/src/theme/dimensions.js
new file mode 100644
index 00000000..bc20cb91
--- /dev/null
+++ b/modern/src/theme/dimensions.js
@@ -0,0 +1,7 @@
+export default {
+ inputHeight: 42,
+ borderRadius: 4,
+ maxFormWidth: 335,
+ sidebarWidth: 28,
+ minSidebarWidth: 52
+};
diff --git a/modern/src/theme/index.js b/modern/src/theme/index.js
new file mode 100644
index 00000000..5a3b2a9c
--- /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 00000000..021770b7
--- /dev/null
+++ b/modern/src/theme/overrides.js
@@ -0,0 +1,48 @@
+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,
+ },
+ 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 00000000..24aefce1
--- /dev/null
+++ b/modern/src/theme/palette.js
@@ -0,0 +1,19 @@
+import { deepPurple, green } from '@material-ui/core/colors';
+
+const traccarPurple = deepPurple[500];
+const traccarGreen = green[500];
+const traccarWhite = '#FFF';
+
+export default {
+ common: {
+ purple: traccarPurple,
+ green: traccarGreen
+ },
+ primary: {
+ main: traccarPurple
+ },
+ secondary: {
+ main: traccarGreen,
+ contrastText: traccarWhite
+ }
+};