import {MoonIcon, SunIcon} from '@heroicons/react/24/outline' import clsx from 'clsx' import {Row} from 'web/components/layout/row' import {useTheme} from 'web/hooks/use-theme' import {useT} from 'web/lib/locale' export default function ThemeIcon(props: {className?: string}) { const {className} = props const {theme, setTheme} = useTheme() const t = useT() const toggleTheme = () => { setTheme(theme === 'auto' ? 'dark' : theme === 'dark' ? 'light' : 'auto') } const children = theme === 'light' ? ( t('theme.light', 'Light') ) : theme === 'dark' ? ( t('theme.dark', 'Dark') ) : ( <> {t('theme.dark', 'Dark')} {t('theme.light', 'Light')} ( {t('theme.auto', 'auto')}) ) const icon = ( <> ) return ( ) }