From 8394ae25a7531fe6e4832701e3c35226b62ee1c3 Mon Sep 17 00:00:00 2001 From: William Grant Date: Mon, 26 Sep 2022 13:39:57 +1000 Subject: [PATCH] fix: session button hover color fixed --- ts/components/basic/SessionButton.tsx | 2 +- ts/themes/SessionTheme.tsx | 2 +- ts/themes/switchTheme.ts | 10 ++++++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ts/components/basic/SessionButton.tsx b/ts/components/basic/SessionButton.tsx index e737fc6a9..84e96136d 100644 --- a/ts/components/basic/SessionButton.tsx +++ b/ts/components/basic/SessionButton.tsx @@ -92,10 +92,10 @@ const StyledButton = styled.div<{ &:not(.disabled) { &:hover { + color: ${props => `var(--button-${props.buttonType}-text-hover-color)`}; ${props => props.buttonType && `background-color: var(--button-${props.buttonType}-background-hover-color);`}; - ${props => props.color && `color: var(--button-${props.buttonType}-text-color);`} ${props => props.buttonType === SessionButtonType.Outline && 'outline: none; border: 1px solid var(--button-outline-border-hover-color);'}; diff --git a/ts/themes/SessionTheme.tsx b/ts/themes/SessionTheme.tsx index 05818d23a..821e057da 100644 --- a/ts/themes/SessionTheme.tsx +++ b/ts/themes/SessionTheme.tsx @@ -542,7 +542,7 @@ export const SessionGlobalStyles = createGlobalStyle` --button-solid-shadow-color: rgba(${hexColorToRGB(THEMES.CLASSIC_LIGHT.COLOR0)}, 0.25); /* Simple */ - /* TODO Theming - Should this be different? */ + --button-simple-text-color: var(--text-primary-color); --button-simple-disabled-color: var(--text-primary-color); /* Icons */ diff --git a/ts/themes/switchTheme.ts b/ts/themes/switchTheme.ts index 7b4aebd71..d8880893b 100644 --- a/ts/themes/switchTheme.ts +++ b/ts/themes/switchTheme.ts @@ -150,6 +150,11 @@ function loadClassicLight() { `rgba(${hexColorToRGB(THEMES.CLASSIC_LIGHT.COLOR0)}, 0.25)` ); + document.documentElement.style.setProperty( + '--button-simple-text-color', + 'var(--text-primary-color)' + ); + document.documentElement.style.setProperty( '--button-simple-disabled-color', 'var(--text-primary-color)' @@ -490,6 +495,11 @@ function loadClassicDark() { ); document.documentElement.style.setProperty('--button-solid-shadow-color', 'none'); + document.documentElement.style.setProperty( + '--button-simple-text-color', + 'var(--text-primary-color)' + ); + document.documentElement.style.setProperty( '--button-simple-disabled-color', 'var(--text-primary-color)'