import React from 'react';
import { ActionIcon, useMantineColorScheme } from '@mantine/core';
import { IconSun, IconMoon } from '@tabler/icons-react';
export default function ThemeToggle() {
    const { colorScheme, toggleColorScheme } = useMantineColorScheme();
    const dark = colorScheme === 'dark';


    return (
        <ActionIcon
            variant="outline"
            onClick={() => {
                toggleColorScheme();
            }}
            title="Toggle color scheme"
        >
            {dark ? <IconSun size={16} /> : <IconMoon size={16} />}
        </ActionIcon>
    );
}
