From 692d73f97a62beab9dcda99443fd1c6944bc87c3 Mon Sep 17 00:00:00 2001 From: Dex404 Date: Tue, 16 Apr 2024 09:04:20 +0000 Subject: [PATCH] navbar --- components/Button/Button.tsx | 4 +- components/Navbar/Navbar.tsx | 202 ++++++++++++++++++++++++++--------- 2 files changed, 151 insertions(+), 55 deletions(-) diff --git a/components/Button/Button.tsx b/components/Button/Button.tsx index 0f379b2..980e86c 100644 --- a/components/Button/Button.tsx +++ b/components/Button/Button.tsx @@ -36,7 +36,7 @@ const button = cva(["inline-flex", "items-center", "rounded-xl", "text-center", "border-solid", "border-2", "border-slate-100", - "flex", + "mx-auto", ], hero1: [ @@ -67,7 +67,6 @@ const button = cva(["inline-flex", "items-center", "rounded-xl", "text-center", "hover:border-white", "rounded", "flex", - , "my-1", "w-[50%]", "max-md:w-full", @@ -77,6 +76,7 @@ const button = cva(["inline-flex", "items-center", "rounded-xl", "text-center", sm: ["min-w-20", "h-full", "min-h-10", "text-sm", "py-1.5", "px-4"], lg: ["min-w-32", "h-full", "min-h-12", "text-lg", "py-2.5", "px-6"], hero1: ["min-w-15", "h-full", "min-h-5", "text-sm", "px-5", "py-2"], + hero2: ["min-w-15", "h-full", "min-h-5", "text-sm", "px-2", "py-0"], }, underline: { true: ["underline"], false: [] }, }, diff --git a/components/Navbar/Navbar.tsx b/components/Navbar/Navbar.tsx index ae6732a..8bf6972 100644 --- a/components/Navbar/Navbar.tsx +++ b/components/Navbar/Navbar.tsx @@ -33,65 +33,161 @@ const Navbar: React.FC = ({ logoSrc }) => { transition: "transform .2s", // Optional: Smooth transition } + const [isNavOpen, setIsNavOpen] = useState(false) + + const mobileNavStyle = { + display: isNavOpen ? "block" : "none", + } + + const desktopNavStyle = { + display: isNavOpen ? "none" : "block", + } + return ( ) }