-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(theme): 🎨 Change primary color & add theme toggle
- Loading branch information
1 parent
3468390
commit 3f0094e
Showing
7 changed files
with
38 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { ActionIcon, Tooltip, useMantineColorScheme } from "@mantine/core"; | ||
import { IconLock, IconMoon, IconSun } from "@tabler/icons-react"; | ||
|
||
import { useColorScheme } from "@mantine/hooks"; | ||
|
||
export default function ThemeIcon() { | ||
const colorScheme = useMantineColorScheme(); | ||
const Icon = colorScheme.colorScheme === "dark" ? IconSun : IconMoon; | ||
return ( | ||
<Tooltip label="Toggle Color Scheme" openDelay={500}> | ||
<ActionIcon | ||
variant={"default"} | ||
size="sm" | ||
onClick={colorScheme.toggleColorScheme} | ||
color={colorScheme.colorScheme == "light" ? "yellow" : undefined} | ||
> | ||
<Icon style={{ width: "70%", height: "70%" }} stroke={1.5} /> | ||
</ActionIcon> | ||
</Tooltip> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters