feat: Assign colors to events (#15298)
* feat: Assign colors to events * update * final update * update * fix requested changes error * Update EventAdvancedTab.tsx * add contrast check * update * fix contrsterror message visibility * fix type error * fix * update test --------- Co-authored-by: Udit Takkar <[email protected]> Co-authored-by: sean-brydon <[email protected]>
This commit is contained in:
23 files changed
+289
-120
No files matched your search
@@ -348,12 +348,11 @@ const AppearanceView = ({
|
||||
defaultValue={DEFAULT_BRAND_COLOURS.light}
|
||||
resetDefaultValue={DEFAULT_LIGHT_BRAND_COLOR}
|
||||
onChange={(value) => {
|
||||
try {
|
||||
checkWCAGContrastColor("#ffffff", value);
|
||||
if (checkWCAGContrastColor("#ffffff", value)) {
|
||||
setLightModeError(false);
|
||||
brandColorsFormMethods.setValue("brandColor", value, { shouldDirty: true });
|
||||
} catch (err) {
|
||||
setLightModeError(false);
|
||||
} else {
|
||||
setLightModeError(true);
|
||||
}
|
||||
}}
|
||||
/>
|
||||
@@ -377,11 +376,10 @@ const AppearanceView = ({
|
||||
defaultValue={DEFAULT_BRAND_COLOURS.dark}
|
||||
resetDefaultValue={DEFAULT_DARK_BRAND_COLOR}
|
||||
onChange={(value) => {
|
||||
try {
|
||||
checkWCAGContrastColor("#101010", value);
|
||||
if (checkWCAGContrastColor("#101010", value)) {
|
||||
setDarkModeError(false);
|
||||
brandColorsFormMethods.setValue("darkBrandColor", value, { shouldDirty: true });
|
||||
} catch (err) {
|
||||
} else {
|
||||
setDarkModeError(true);
|
||||
}
|
||||
}}
|
||||
|
||||
Reference in new issue
Block a user