mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-09 15:05:35 +00:00
refactor: remove all legacy files
+ comment/delete things that haven't yet migrated to mantine
This commit is contained in:
16
inertia/components/common/theme_switcher.tsx
Normal file
16
inertia/components/common/theme_switcher.tsx
Normal file
@@ -0,0 +1,16 @@
|
||||
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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user