💄 Prettier codebase
This commit is contained in:
@@ -1,23 +1,14 @@
|
||||
import {
|
||||
ActionIcon,
|
||||
ActionIconProps,
|
||||
} from '@mantine/core';
|
||||
import { useColorScheme } from '~/hooks/use-colorscheme';
|
||||
import { ActionIcon, ActionIconProps } from '@mantine/core';
|
||||
import { IconMoonStars, IconSun } from '@tabler/icons-react';
|
||||
import { useColorScheme } from '~/hooks/use-colorscheme';
|
||||
|
||||
export const ThemeSchemeToggle = (props : Partial<ActionIconProps>) => {
|
||||
export const ThemeSchemeToggle = (props: Partial<ActionIconProps>) => {
|
||||
const { colorScheme, toggleColorScheme } = useColorScheme();
|
||||
const Icon = colorScheme === 'dark' ? IconSun : IconMoonStars;
|
||||
|
||||
return (
|
||||
<ActionIcon
|
||||
size={50}
|
||||
variant="outline"
|
||||
radius="md"
|
||||
onClick={toggleColorScheme}
|
||||
{...props}
|
||||
>
|
||||
<Icon size="66%"/>
|
||||
<ActionIcon size={50} variant="outline" radius="md" onClick={toggleColorScheme} {...props}>
|
||||
<Icon size="66%" />
|
||||
</ActionIcon>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user