mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
fix: color variable (#2059)
This commit is contained in:
@@ -1,10 +1,15 @@
|
||||
import { DarkModeIcon, LightModeIcon } from '@blocksuite/icons';
|
||||
import { useTheme } from 'next-themes';
|
||||
import { useState } from 'react';
|
||||
import { useEffect, useState } from 'react';
|
||||
|
||||
import { StyledSwitchItem, StyledThemeModeSwitch } from './style';
|
||||
export const ThemeModeSwitch = () => {
|
||||
const { setTheme, resolvedTheme } = useTheme();
|
||||
|
||||
useEffect(() => {
|
||||
window.apis?.onThemeChange(resolvedTheme === 'dark' ? 'dark' : 'light');
|
||||
}, [resolvedTheme]);
|
||||
|
||||
const [isHover, setIsHover] = useState(false);
|
||||
return (
|
||||
<StyledThemeModeSwitch
|
||||
|
||||
Reference in New Issue
Block a user