import type { JSX } from 'react' import { ActionIcon, useMantineColorScheme, useComputedColorScheme, } from '@mantine/core' import { IconSun, IconMoon } from '@tabler/icons-react' import cx from 'clsx' import classes from './ThemeBtn.module.css' export default function ThemeBtn(): JSX.Element { const { setColorScheme } = useMantineColorScheme() const computedColorScheme = useComputedColorScheme('light', { getInitialValueInEffect: true, }) return ( { setColorScheme(computedColorScheme === 'light' ? 'dark' : 'light') }} variant="default" size="lg" aria-label="Toggle color scheme" > ) }