diff --git a/flowbite.config.ts b/flowbite.config.ts index be99d70..999a517 100644 --- a/flowbite.config.ts +++ b/flowbite.config.ts @@ -14,11 +14,6 @@ export default { gray: "text-gray-900 bg-white border border-white hover:bg-white hover:text-primary disabled:hover:bg-white dark:bg-gray-50 dark:text-gray-700 dark:border-gray-50 dark:hover:text-primary dark:hover:bg-white dark:disabled:hover:bg-gray-50", }, }, - navbar: { - root: { - base: "py-2.5", - }, - }, avatar: { root: { base: "flex items-start", diff --git a/src/components/Header.tsx b/src/components/Header.tsx index d56cb72..cd73af4 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -1,4 +1,5 @@ -import { Navbar } from "flowbite-react"; +import { Menu as MenuIcon } from "lucide-react"; +import { useState } from "react"; import { SvgLoader } from "react-svgmt"; import { useAccount, useSwitchChain } from "wagmi"; @@ -6,10 +7,12 @@ import { CollectionSwitcher } from "#/components/CollectionSwitcher"; import NavLink from "#/components/NavLink"; import Profile from "#/components/Profile"; import { DEFAULT_CHAIN } from "#/constants"; +import HeaderNav from "./HeaderNav"; export default function Header() { const { chain, isConnected } = useAccount(); const { switchChain } = useSwitchChain(); + const [showMenu, setShowMenu] = useState(false); const isInvalidChain = isConnected && chain?.id !== DEFAULT_CHAIN.id; return ( @@ -30,36 +33,40 @@ export default function Header() { and continue using the app. )} - - + +
+ - - - + + - -
-
- -
-
Dashboard
-
-
+
+ {/* DESKTOP MENU */} +
+ +
- -
-
Create
-
-
-
+ {/* SETTINGS MENU */} +
·
+ + -
- - -
+ {/* TOGGLE MENU */} +
(showMenu !== true ? setShowMenu(true) : setShowMenu(false))} + > +
- - +
+
+ + {/* MOBILE MENU */} + {showMenu && ( +
+ +
+ )}
); } diff --git a/src/components/HeaderNav.tsx b/src/components/HeaderNav.tsx new file mode 100644 index 0000000..eaf5c0d --- /dev/null +++ b/src/components/HeaderNav.tsx @@ -0,0 +1,18 @@ +import NavLink from "#/components/NavLink"; + +export default function HeaderNav() { + return ( + <> + +
+
Dashboard
+
+
+ +
+
Create
+
+
+ + ); +} diff --git a/src/components/Profile/index.tsx b/src/components/Profile/index.tsx index a237765..dcbda98 100644 --- a/src/components/Profile/index.tsx +++ b/src/components/Profile/index.tsx @@ -79,10 +79,8 @@ export default function Profile() { onClick={() => setShowDisconnect(true)} >
- - - - + +