fix hover issue in SwitchThemeMenu

This commit is contained in:
Halit Aksoy 2022-09-03 21:42:48 +03:00
parent 0e09ed4750
commit 1fa0fdf973

View File

@ -18,9 +18,15 @@ const ThemeSwitchMenu: FunctionComponent<{ context: Context, textColor: string }
key={index} key={index}
style={{ color: textColor }} style={{ color: textColor }}
//@ts-ignore //@ts-ignore
onMouseOver={(event) => (event.target.style.background = "transparent")} onMouseOver={(event) => {
const htmlElement: HTMLElement = event.target as HTMLElement;
if (htmlElement.localName === "li") htmlElement.style.background = "transparent";
}}
//@ts-ignore //@ts-ignore
onMouseOut={(event) => (event.target.style.background = "transparent")} onMouseOut={(event) => {
const htmlElement: HTMLElement = event.target as HTMLElement;
if (htmlElement.localName === "li") htmlElement.style.background = "transparent";
}}
onClick={() => (context.themeManager.theme = theme)}> onClick={() => (context.themeManager.theme = theme)}>
<div style={{ background: theme.themePreviewColor }} className="theme-color-circle" /> <div style={{ background: theme.themePreviewColor }} className="theme-color-circle" />
{theme.name} {theme.name}