-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
65f528d
commit e876ba9
Showing
6 changed files
with
102 additions
and
249 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,86 +1,34 @@ | ||
import { useState } from "react"; | ||
import { CiMenuBurger } from "react-icons/ci"; | ||
|
||
import { WalletManager } from "../quarks/WalletManager"; | ||
import { useState } from "react"; | ||
import { MobileNavItem, NavItem } from "../quarks/NavItem"; | ||
import { NavItem } from "../quarks/NavItem"; | ||
import { PortalLogoWithText } from "../quarks/LogoVectors"; | ||
|
||
export const Header = () => { | ||
const [showMenu, setShowMenu] = useState(false); | ||
|
||
return ( | ||
<> | ||
<div className="flex flex-col"> | ||
<header className="flex flex-col gap-1"> | ||
<div className="flex flex-row gap-1 justify-between"> | ||
<a className="flex mb-12" href={navBar[0].href}> | ||
<PortalLogoWithText /> | ||
</a> | ||
<div | ||
className=" | ||
flex flex-row | ||
gap-1 | ||
justify-between | ||
items-center | ||
" | ||
className="md:hidden flex flex-row px-4 hover:cursor-pointer" | ||
onClick={() => setShowMenu((p) => !p)} | ||
> | ||
<a | ||
className=" | ||
flex flex-row gap-2 | ||
items-center | ||
" | ||
href={navBar[0].href} | ||
> | ||
<PortalLogoWithText /> | ||
</a> | ||
<div | ||
className=" | ||
collapse md:visible | ||
flex flex-row | ||
justify-end | ||
items-center px-2 | ||
w-2/3 | ||
grow | ||
" | ||
> | ||
<div | ||
className=" | ||
flex flex-row justify-between | ||
gap-8 | ||
items-center | ||
py-8 | ||
" | ||
> | ||
{navBar.map((x, idx) => { | ||
return ( | ||
<> | ||
<NavItem key={idx} item={x} /> | ||
</> | ||
); | ||
})} | ||
<WalletManager /> | ||
</div> | ||
</div> | ||
<div | ||
className=" | ||
md:hidden | ||
flex flex-row items-center px-4 | ||
hover:cursor-pointer | ||
" | ||
onClick={() => { | ||
setShowMenu(!showMenu); | ||
}} | ||
> | ||
<CiMenuBurger className="w-5 h-5 stroke-white stroke-1" /> | ||
</div> | ||
<CiMenuBurger className="w-5 h-5 stroke-white stroke-1" /> | ||
</div> | ||
</div> | ||
<div className={`${showMenu ? "" : "hidden"} md:flex`}> | ||
<div className="flex flex-col gap-6 pb-6"> | ||
{navBar.map((x, idx) => ( | ||
<NavItem key={idx} item={x} /> | ||
))} | ||
<WalletManager /> | ||
</div> | ||
{showMenu && ( | ||
<div className={` md:hidden pb-8 duration-200`}> | ||
<div className="flex flex-col text-start"> | ||
{navBar.map((x, idx) => { | ||
return ( | ||
<> | ||
<MobileNavItem key={idx} item={x} /> | ||
</> | ||
); | ||
})} | ||
</div> | ||
</div> | ||
)} | ||
</div> | ||
</> | ||
</header> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.