This commit is contained in:
2023-03-16 11:56:41 +00:00
commit 1dcb2b6c3d
49 changed files with 14668 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
import { ActionIcon, Group, useMantineColorScheme } from "@mantine/core";
import { IconMoonStars, IconSun } from "@tabler/icons";
export function ColorSchemeToggle() {
const { colorScheme, toggleColorScheme } = useMantineColorScheme();
return (
<Group position="center" mt="xl">
<ActionIcon
onClick={() => toggleColorScheme()}
size="xl"
sx={(theme) => ({
backgroundColor:
theme.colorScheme === "dark" ? theme.colors.dark[6] : theme.colors.gray[0],
color: theme.colorScheme === "dark" ? theme.colors.yellow[4] : theme.colors.blue[6],
})}
>
{colorScheme === "dark" ? (
<IconSun size={20} stroke={1.5} />
) : (
<IconMoonStars size={20} stroke={1.5} />
)}
</ActionIcon>
</Group>
);
}