Files
my-links/inertia/components/common/theme_switcher.tsx
Sonny 5c37fe9c31 refactor: remove all legacy files
+ comment/delete things that haven't yet migrated to mantine
2024-11-10 00:00:20 +01:00

17 lines
446 B
TypeScript

import { ActionIcon, useMantineColorScheme } from '@mantine/core';
import { TbMoonStars, TbSun } from 'react-icons/tb';
export function MantineThemeSwitcher() {
const { colorScheme, toggleColorScheme } = useMantineColorScheme();
return (
<ActionIcon
variant="light"
aria-label="Toggle color scheme"
onClick={() => toggleColorScheme()}
size="lg"
>
{colorScheme === 'dark' ? <TbSun /> : <TbMoonStars />}
</ActionIcon>
);
}