From 470a1bfcfab348448ec38e4b98343635d5b173f5 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Wed, 27 Nov 2024 14:50:05 +0800 Subject: [PATCH] adjusted theme settings for color fixes --- Client/src/Components/Charts/BarChart/index.jsx | 4 +--- Client/src/Components/Label/index.jsx | 4 ++-- Client/src/Utils/Theme/constants.js | 3 +++ Client/src/Utils/Theme/darkTheme.js | 3 +++ Client/src/Utils/Theme/globalTheme.js | 3 ++- Client/src/Utils/Theme/lightTheme.js | 3 +++ 6 files changed, 14 insertions(+), 6 deletions(-) diff --git a/Client/src/Components/Charts/BarChart/index.jsx b/Client/src/Components/Charts/BarChart/index.jsx index 70fd66390..b1c46a9d6 100644 --- a/Client/src/Components/Charts/BarChart/index.jsx +++ b/Client/src/Components/Charts/BarChart/index.jsx @@ -158,9 +158,7 @@ const BarChart = ({ checks = [] }) => { width="100%" height={`${animate ? check.responseTime : 0}%`} backgroundColor={ - check.status - ? theme.palette.success.main - : theme.palette.error.contrastText + check.status ? theme.palette.success.main : theme.palette.error.main } sx={{ borderRadius: theme.spacing(1.5), diff --git a/Client/src/Components/Label/index.jsx b/Client/src/Components/Label/index.jsx index eb6499a31..664cfd4af 100644 --- a/Client/src/Components/Label/index.jsx +++ b/Client/src/Components/Label/index.jsx @@ -127,11 +127,11 @@ const StatusLabel = ({ status, text, customStyles }) => { const colors = { up: { dotColor: theme.palette.success.main, - bgColor: theme.palette.success./* dark */ contrastText, + bgColor: theme.palette.success.contrastText /* dark */, borderColor: theme.palette.success.main /* light */, }, down: { - dotColor: theme.palette.error.contrastText, + dotColor: theme.palette.error.main, bgColor: theme.palette.error.dark, borderColor: theme.palette.error.light, }, diff --git a/Client/src/Utils/Theme/constants.js b/Client/src/Utils/Theme/constants.js index 0626edbaa..ed3719278 100644 --- a/Client/src/Utils/Theme/constants.js +++ b/Client/src/Utils/Theme/constants.js @@ -22,6 +22,7 @@ const paletteColors = { gray80: "#FDFCFD", gray90: "#FCFCFD", gray100: "#F4F4F4", + gray150: "#EFEFEF", gray200: "#E3E3E3", gray300: "#A2A3A3", gray500: "#838C99", @@ -205,10 +206,12 @@ const semanticColors = { light: { light: paletteColors.gray200, dark: paletteColors.gray800, + disabled: paletteColors.gray150, }, dark: { light: paletteColors.gray200, dark: paletteColors.gray750, + disabled: paletteColors.gray800, }, }, unresolved: { diff --git a/Client/src/Utils/Theme/darkTheme.js b/Client/src/Utils/Theme/darkTheme.js index 0f4a391de..26f4ba340 100644 --- a/Client/src/Utils/Theme/darkTheme.js +++ b/Client/src/Utils/Theme/darkTheme.js @@ -23,6 +23,9 @@ const { } = colors; const palette = { + action: { + disabled: border.dark.disabled, + }, primary: { main: primary.main.dark }, secondary: { main: secondary.main.dark, diff --git a/Client/src/Utils/Theme/globalTheme.js b/Client/src/Utils/Theme/globalTheme.js index 0839cd0e8..e5c60485a 100644 --- a/Client/src/Utils/Theme/globalTheme.js +++ b/Client/src/Utils/Theme/globalTheme.js @@ -220,7 +220,7 @@ const baseTheme = (palette) => ({ height: "var(--env-var-height-2)", fontSize: "var(--env-var-font-size-medium)", fontWeight: 400, - color: palette.text.secondary, // or any color from your palette + color: "palette.text.secondary", }, "& .MuiInputBase-input.MuiOutlinedInput-input": { padding: "0 var(--env-var-spacing-1-minus) !important", @@ -231,6 +231,7 @@ const baseTheme = (palette) => ({ "& .MuiOutlinedInput-notchedOutline": { borderRadius: 4, }, + "& .MuiFormHelperText-root": { color: palette.error.main, opacity: 0.8, diff --git a/Client/src/Utils/Theme/lightTheme.js b/Client/src/Utils/Theme/lightTheme.js index 8bc6434c6..88e47282d 100644 --- a/Client/src/Utils/Theme/lightTheme.js +++ b/Client/src/Utils/Theme/lightTheme.js @@ -28,6 +28,9 @@ const { } = colors; const palette = { + action: { + disabled: border.light.disabled, + }, primary: { main: primary.main.light }, secondary: { main: secondary.main.light,