mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-26 21:10:38 +03:00
16 lines
579 B
TypeScript
16 lines
579 B
TypeScript
import { useConceptTheme } from '../../context/ThemeContext';
|
|
import { DarkThemeIcon, LightThemeIcon } from '../Icons';
|
|
import NavigationButton from './NavigationButton';
|
|
|
|
function ThemeSwitcher() {
|
|
const { darkMode, toggleDarkMode } = useConceptTheme();
|
|
return (
|
|
<>
|
|
{darkMode && <NavigationButton icon={<LightThemeIcon />} description='Светлая тема' onClick={toggleDarkMode} />}
|
|
{!darkMode && <NavigationButton icon={<DarkThemeIcon />} description='Темная тема' onClick={toggleDarkMode} />}
|
|
</>
|
|
);
|
|
}
|
|
|
|
export default ThemeSwitcher;
|