From 56d5a025e5f081c1b119a7236c988fc5ec0d3f75 Mon Sep 17 00:00:00 2001 From: Damien Robson Date: Wed, 27 Nov 2024 14:54:29 +0000 Subject: [PATCH] fix(switch): fixes the invalid design token when using hint text on dark backgrounds 7086 --- src/components/switch/switch.stories.tsx | 17 +++++++++++++++++ src/components/switch/switch.style.ts | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/components/switch/switch.stories.tsx b/src/components/switch/switch.stories.tsx index 7214ca3bc2..aa5753c384 100644 --- a/src/components/switch/switch.stories.tsx +++ b/src/components/switch/switch.stories.tsx @@ -387,3 +387,20 @@ export const NewValidationInlineWithDarkModeAndError: Story = () => { }; NewValidationInlineWithDarkModeAndError.storyName = "New Validation - Inline with dark background support and error"; + +export const NewValidationInlineWithDarkModeAndHint: Story = () => { + return ( + + + + + + ); +}; +NewValidationInlineWithDarkModeAndHint.storyName = + "New Validation - Inline with dark background support and hint text"; diff --git a/src/components/switch/switch.style.ts b/src/components/switch/switch.style.ts index 8c26a02990..4d3abbe18f 100644 --- a/src/components/switch/switch.style.ts +++ b/src/components/switch/switch.style.ts @@ -67,7 +67,7 @@ export const StyledHintText = styled.div` max-width: 160px; ${({ isDarkBackground }) => css` color: ${isDarkBackground - ? "var(--colorsUtilityYang065)" + ? "var(--colorsUtilityYang080)" : "var(--colorsUtilityYin055)"}; `} `;