mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-27 05:20:36 +03:00
15 lines
562 B
TypeScript
15 lines
562 B
TypeScript
![]() |
import { useTheme } from '../../context/ThemeContext';
|
||
|
import { DarkThemeIcon, LightThemeIcon } from '../Icons';
|
||
|
import NavigationButton from './NavigationButton';
|
||
|
|
||
|
function ThemeSwitcher() {
|
||
|
const {darkMode, toggleDarkMode} = useTheme();
|
||
|
return (
|
||
|
<>
|
||
|
{darkMode && <NavigationButton icon={<LightThemeIcon />} description='Светлая тема' onClick={toggleDarkMode} />}
|
||
|
{!darkMode && <NavigationButton icon={<DarkThemeIcon />} description='Темная тема' onClick={toggleDarkMode} />}
|
||
|
</>
|
||
|
);
|
||
|
}
|
||
|
|
||
|
export default ThemeSwitcher;
|