mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-02 19:45:54 +01:00
Edit ColorSchemeToggle
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { ActionIcon, useMantineColorScheme } from '@mantine/core';
|
||||
import { ActionIcon, Box, useMantineColorScheme } from '@mantine/core';
|
||||
import { Sun, MoonStars } from 'tabler-icons-react';
|
||||
import { motion } from 'framer-motion';
|
||||
|
||||
@@ -14,15 +14,15 @@ export function ColorSchemeToggle() {
|
||||
borderRadius: '100%',
|
||||
}}
|
||||
>
|
||||
<ActionIcon
|
||||
<Box
|
||||
onClick={() => toggleColorScheme()}
|
||||
size="xl"
|
||||
sx={(theme) => ({
|
||||
cursor: "pointer",
|
||||
color: theme.colorScheme === 'dark' ? theme.colors.yellow[4] : theme.colors.blue[6],
|
||||
})}
|
||||
>
|
||||
{colorScheme === 'dark' ? <Sun size={24} /> : <MoonStars size={24} />}
|
||||
</ActionIcon>
|
||||
</Box>
|
||||
</motion.div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user