-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
1 changed file
with
45 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,54 @@ | ||
import Icon from "./Icon.tsx"; | ||
import Link from "./Link.tsx"; | ||
import type { icons } from "lucide-preact"; | ||
|
||
type NavbarItem = { | ||
iconName: keyof typeof icons; | ||
name: string; | ||
to: string; | ||
}; | ||
|
||
export default function Navbar() { | ||
return ( | ||
<div className="relative z-100 bg-background justify-between flex w-full py-2 px-4 rounded-t-md text-sm border-t border-border shadow-[0px_-10px_20px_rgba(0,_0,_0,_0.38)]"> | ||
<Link to="discover" className="flex flex-col items-center gap-y-1 "> | ||
<Icon name="Gem" className="size-6" /> | ||
<p>Discover</p> | ||
</Link> | ||
<div className="flex flex-col items-center gap-y-1"> | ||
<Icon name="MessagesSquare" className="size-6" /> | ||
<p>Chat</p> | ||
</div> | ||
<Link to="pfrax" className="flex flex-col items-center gap-y-1"> | ||
<Icon name="Touchpad" className="size-6" /> | ||
<p>PFRAX</p> | ||
</Link> | ||
<div className="flex flex-col items-center gap-y-1"> | ||
<Icon name="Plus" className="size-6" /> | ||
<p>Create</p> | ||
</div> | ||
<div className="flex flex-col items-center gap-y-1"> | ||
<Icon name="Wallet" className="size-6" /> | ||
<p>Portfolio</p> | ||
</div> | ||
{navbarList.map((item, key) => ( | ||
<Link | ||
key={key} | ||
to={item.to} | ||
className="flex flex-col items-center gap-y-1" | ||
> | ||
<Icon name={item.iconName} className="size-5" weight="light" /> | ||
<p className="text-xs">{item.name}</p> | ||
</Link> | ||
))} | ||
</div> | ||
); | ||
} | ||
|
||
const navbarList: NavbarItem[] = [ | ||
{ | ||
iconName: "Gem", | ||
name: "Discover", | ||
to: "/discover", | ||
}, | ||
{ | ||
iconName: "MessagesSquare", | ||
name: "Chat", | ||
to: "/chat", | ||
}, | ||
{ | ||
iconName: "Touchpad", | ||
name: "PFRAX", | ||
to: "pfrax", | ||
}, | ||
{ | ||
iconName: "Plus", | ||
name: "Create", | ||
to: "create", | ||
}, | ||
{ | ||
iconName: "Wallet", | ||
name: "Portfolio", | ||
to: "portfolio", | ||
}, | ||
]; |