fix SwitchThemeMenu issues
This commit is contained in:
parent
3344439ef4
commit
1a305dc74c
@ -8,18 +8,17 @@ import "@szhsin/react-menu/dist/transitions/slide.css"
|
||||
const ThemeSwitchMenu: FunctionComponent<{ context: Context, textColor: string }> = (props) => {
|
||||
const { context, textColor } = props;
|
||||
const menuButton = <span
|
||||
style={{ color: textColor }}
|
||||
style={{ color: textColor, cursor: 'pointer', userSelect: 'none' }}
|
||||
className="material-symbols-outlined">
|
||||
light_mode
|
||||
</span>;
|
||||
const menuItems = context.themeManager.themes.map((theme, index) => {
|
||||
const themeBackground = context.themeManager.theme.background;
|
||||
return (
|
||||
<MenuItem
|
||||
key={index}
|
||||
style={{ color: textColor }}
|
||||
//@ts-ignore
|
||||
onMouseOver={(event) => (event.target.style.background = themeBackground)}
|
||||
onMouseOver={(event) => (event.target.style.background = "transparent")}
|
||||
//@ts-ignore
|
||||
onMouseOut={(event) => (event.target.style.background = "transparent")}
|
||||
onClick={() => (context.themeManager.theme = theme)}>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user