refactor(mantine): migrate home page

This commit is contained in:
Sonny
2024-10-31 02:25:59 +01:00
committed by Sonny
parent 8d474f74eb
commit 5c4ee3a1cd
13 changed files with 160 additions and 217 deletions

View 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>
);
}