2023-07-25 00:20:37 +03:00
|
|
|
import { useConceptTheme } from '../../context/ThemeContext';
|
2023-07-15 17:46:19 +03:00
|
|
|
import { DarkThemeIcon, LightThemeIcon } from '../Icons';
|
|
|
|
import NavigationButton from './NavigationButton';
|
|
|
|
|
|
|
|
function ThemeSwitcher() {
|
2023-07-25 20:27:29 +03:00
|
|
|
const { darkMode, toggleDarkMode } = useConceptTheme();
|
2023-07-15 17:46:19 +03:00
|
|
|
return (
|
|
|
|
<>
|
|
|
|
{darkMode && <NavigationButton icon={<LightThemeIcon />} description='Светлая тема' onClick={toggleDarkMode} />}
|
|
|
|
{!darkMode && <NavigationButton icon={<DarkThemeIcon />} description='Темная тема' onClick={toggleDarkMode} />}
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2023-07-25 20:27:29 +03:00
|
|
|
export default ThemeSwitcher;
|