Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#IMP-033: relocated sidebar trigger to right #110

Merged
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions src/components/Layouts/Header/Sidebar/_index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Drawer, DrawerContent, DrawerTrigger } from "@/components/ui/drawer";
import { ArrowUpRight, Menu } from "lucide-react";
import { ArrowUpRight, ChevronsRight, Menu } from "lucide-react";
import Link from "next/link";
import Logo from "../Logo";
import ThemeToggle from "../../ThemeToggle";
Expand Down Expand Up @@ -85,12 +85,15 @@ export default function Sidebar() {
};

return (
<Drawer direction="left">
<Drawer direction="right">
<DrawerTrigger id="sidebar-trigger" className="lg:hidden">
<Menu size={24} />
</DrawerTrigger>
<DrawerContent className="lg:hidden h-[100dvh] w-2/3 flex flex-col p-5 gap-y-10">
<Logo className="h-auto w-2/3 md:w-1/2" />
<DrawerContent className="lg:hidden h-[100dvh] flex flex-col p-8 gap-y-10">
<p className="flex items-center text-sx dark:text-gray-400 text-gray">
Pet3r1512 marked this conversation as resolved.
Show resolved Hide resolved
Drag to close <ChevronsRight />
</p>
<Logo className="h-auto w-32 md:w-56" />
<aside className="flex flex-col gap-y-2.5 px-2 md:px-5 flex-1">
<Accordion type="single" collapsible className="w-full">
{navlinks.map((nav, index) => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Layouts/Header/_index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export default function Header() {
return (
<header className="flex items-center justify-between py-5 px-5 lg:px-0 sticky top-0 z-30 !backdrop-filter !backdrop-blur-xl">
<div className="max-w-[1440px] w-full mx-auto flex items-center justify-between">
<Sidebar />
<div className="flex items-center gap-x-8">
<DynamicLogo />
<DynamicNavBar />
Expand All @@ -43,6 +42,7 @@ export default function Header() {
<ThemeToggle />
<Github size={20} />
</div>
<Sidebar />
</div>
</header>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/drawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const DrawerContent = React.forwardRef<
<DrawerPrimitive.Content
ref={ref}
className={cn(
"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-r-[18px] border border-neutral-200 bg-white dark:border-neutral-800 dark:bg-neutral-950",
"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col border border-neutral-200 bg-white dark:border-neutral-800 dark:bg-neutral-950",
className
)}
{...props}
Expand Down
Loading