updated appheader

This commit is contained in:
Ren Amamiya
2023-03-14 10:57:51 +07:00
parent 431f21e02c
commit 8a80b36f9c
4 changed files with 40 additions and 4 deletions

View File

@@ -0,0 +1,30 @@
import { ArrowLeftIcon, ArrowRightIcon } from '@radix-ui/react-icons';
import { useRouter } from 'next/router';
export default function AppHeader() {
const router = useRouter();
const goBack = () => {
router.back();
};
const goForward = () => {
window.history.forward();
};
return (
<div data-tauri-drag-region className="flex h-full w-full items-center">
<div className="relative w-[68px] shrink-0">{/* macos traffic lights */}</div>
<div className="px-2.5">
<div className="flex h-full gap-2">
<button onClick={() => goBack()} className="group rounded-md p-1 hover:bg-zinc-900">
<ArrowLeftIcon className="h-5 w-5 text-zinc-500 group-hover:text-zinc-300" />
</button>
<button onClick={() => goForward()} className="group rounded-md p-1 hover:bg-zinc-900">
<ArrowRightIcon className="h-5 w-5 text-zinc-500 group-hover:text-zinc-300" />
</button>
</div>
</div>
</div>
);
}