From fcb0ae8ee3889b66ce5cf8aef49073c46029743b Mon Sep 17 00:00:00 2001 From: Andre Turner Date: Wed, 2 Oct 2024 11:04:03 -0500 Subject: [PATCH] revised to use primary.main --- src/components/Changeset/PropertyDiff.tsx | 2 +- src/scenes/Locations/Detail/LocationDetail.tsx | 2 +- src/theme/overrides.ts | 6 ++---- src/theme/palette.ts | 5 +---- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/components/Changeset/PropertyDiff.tsx b/src/components/Changeset/PropertyDiff.tsx index bc1134e8cd..ff8cac228b 100644 --- a/src/components/Changeset/PropertyDiff.tsx +++ b/src/components/Changeset/PropertyDiff.tsx @@ -19,7 +19,7 @@ const useStyles = makeStyles()(({ palette, shape, spacing }) => ({ }, current: { color: palette.primary.dark, - background: fade(palette.primary.light, 0.5), + background: fade(palette.primary.main, 0.5), }, })); diff --git a/src/scenes/Locations/Detail/LocationDetail.tsx b/src/scenes/Locations/Detail/LocationDetail.tsx index c86f72da68..926e83e9c6 100644 --- a/src/scenes/Locations/Detail/LocationDetail.tsx +++ b/src/scenes/Locations/Detail/LocationDetail.tsx @@ -144,7 +144,7 @@ export const LocationDetail = () => { fill: theme.palette.primary.main, }, '#Highlight_Circle': { - fill: theme.palette.primary.light, + fill: theme.palette.primary.main, }, })} /> diff --git a/src/theme/overrides.ts b/src/theme/overrides.ts index 5a0ce6deb0..cb11750972 100644 --- a/src/theme/overrides.ts +++ b/src/theme/overrides.ts @@ -11,9 +11,7 @@ export const appComponents = ({ shape, }: Theme): Components => { const dark = palette.mode === 'dark'; - const primaryColorForText = dark - ? palette.primary.light - : palette.primary.main; + const primaryColorForText = palette.primary.main; return { MuiAppBar: { defaultProps: { @@ -144,7 +142,7 @@ export const appComponents = ({ MuiLink: { defaultProps: { underline: 'hover', - color: dark ? 'primary.light' : 'primary.main', + color: 'primary.main', }, }, MuiToggleButtonGroup: { diff --git a/src/theme/palette.ts b/src/theme/palette.ts index b0fd339a15..6334e2374f 100644 --- a/src/theme/palette.ts +++ b/src/theme/palette.ts @@ -1,6 +1,6 @@ import { PaletteColor, PaletteColorOptions } from '@mui/material'; import { grey } from '@mui/material/colors'; -import { lighten, PaletteOptions } from '@mui/material/styles'; +import { PaletteOptions } from '@mui/material/styles'; import { Role } from '~/api/schema/schema.graphql'; export const createPalette = ({ dark }: { dark?: boolean }) => { @@ -14,9 +14,6 @@ export const createPalette = ({ dark }: { dark?: boolean }) => { primary: { main: mainGreen, contrastText: '#ffffff', - // TODO could not be needed anymore with change to primary green - // default is lighten main color by 0.2 - light: lighten(mainGreen, 0.4), }, secondary: { main: dark ? grey[50] : '#3c444e',