mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-09 23:15:36 +00:00
refactor(mantine): migrate home page
This commit is contained in:
16
inertia/components/common/mantine_theme_switcher.tsx
Normal file
16
inertia/components/common/mantine_theme_switcher.tsx
Normal file
@@ -0,0 +1,16 @@
|
||||
import { useMantineColorScheme, ActionIcon } from '@mantine/core';
|
||||
import { TbSun, TbMoonStars } from 'react-icons/tb';
|
||||
|
||||
export function MantineThemeSwitcher() {
|
||||
const { colorScheme, toggleColorScheme } = useMantineColorScheme();
|
||||
return (
|
||||
<ActionIcon
|
||||
variant="default"
|
||||
aria-label="Toggle color scheme"
|
||||
onClick={() => toggleColorScheme()}
|
||||
size="lg"
|
||||
>
|
||||
{colorScheme === 'dark' ? <TbSun /> : <TbMoonStars />}
|
||||
</ActionIcon>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user