mirror of
https://github.com/trafficlunar/blockmatic.git
synced 2026-06-28 14:44:12 +00:00
fix: change colors based on which color scheme
This commit is contained in:
parent
2c852694ea
commit
a5bea3b585
9 changed files with 48 additions and 43 deletions
|
|
@ -1,8 +1,9 @@
|
|||
import { useContext } from "react";
|
||||
import { ThemeContext } from "@/context/Theme";
|
||||
import { MenubarRadioGroup, MenubarRadioItem, MenubarSub, MenubarSubContent, MenubarSubTrigger } from "@/components/ui/menubar";
|
||||
import { useTheme } from "@/context/Theme";
|
||||
|
||||
function ThemeChanger() {
|
||||
const { setTheme, theme } = useTheme();
|
||||
const { setTheme, theme } = useContext(ThemeContext);
|
||||
|
||||
return (
|
||||
<MenubarSub>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
import { useContext } from "react";
|
||||
import { Link } from "react-router";
|
||||
|
||||
import { Menubar as UIMenubar } from "@/components/ui/menubar";
|
||||
import { DialogProvider } from "@/context/Dialog";
|
||||
import { ThemeContext } from "@/context/Theme";
|
||||
|
||||
import { Menubar as UIMenubar } from "@/components/ui/menubar";
|
||||
|
||||
import FileMenu from "./FileMenu";
|
||||
import ViewMenu from "./ViewMenu";
|
||||
|
|
@ -11,11 +14,13 @@ import BlockmaticText from "@/assets/blockmatic-text.svg?react";
|
|||
import GithubIcon from "@/assets/github.svg?react";
|
||||
|
||||
function Menubar() {
|
||||
const { isDark } = useContext(ThemeContext);
|
||||
|
||||
return (
|
||||
<DialogProvider>
|
||||
<UIMenubar className="rounded-none border-t-0 border-x-0 col-span-3">
|
||||
<Link to={{ pathname: "/" }} className="px-4 w-32">
|
||||
<BlockmaticText className="h-full w-full" fill="white" />
|
||||
<BlockmaticText className="h-full w-full" fill={isDark ? "white" : "black"} />
|
||||
</Link>
|
||||
|
||||
<FileMenu />
|
||||
|
|
@ -23,7 +28,7 @@ function Menubar() {
|
|||
<MoreMenu />
|
||||
|
||||
<a href="https://github.com/trafficlunar/blockmatic" className="w-5 absolute right-2">
|
||||
<GithubIcon fill="white" />
|
||||
<GithubIcon fill={isDark ? "white" : "black"} />
|
||||
</a>
|
||||
</UIMenubar>
|
||||
</DialogProvider>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue