"use client"; import { IconMoon, IconSun } from "@tabler/icons-react"; import classNames from "classnames"; import { ActionIcon, useComputedColorScheme, useMantineColorScheme, } from "@mantine/core"; import style from "./ActionToggle.module.css"; export function ColorSchemeToggle() { const { setColorScheme } = useMantineColorScheme(); const computedColorScheme = useComputedColorScheme("light", { getInitialValueInEffect: true, }); return ( setColorScheme( computedColorScheme === "light" ? "dark" : "light" ) } variant="default" size="xl" radius="md" aria-label="Toggle color scheme" className={style.container}> ); }