| 1 | import { Home, CreditCard, User } from "lucide-react"; |
| 2 | import { NavLink } from "@/components/NavLink"; |
| 3 | |
| 4 | const navItems = [ |
| 5 | { to: "/", icon: Home, label: "Home" }, |
| 6 | { to: "/pay", icon: CreditCard, label: "Pay" }, |
| 7 | { to: "/profile", icon: User, label: "Profile" }, |
| 8 | ]; |
| 9 | |
| 10 | const BottomNav = () => { |
| 11 | return ( |
| 12 | <nav className="fixed bottom-0 left-0 right-0 z-50 bg-nav-bg border-t border-nav-border safe-area-bottom"> |
| 13 | <div className="flex justify-around items-center h-16 max-w-lg mx-auto"> |
| 14 | {navItems.map((item) => ( |
| 15 | <NavLink |
| 16 | key={item.to} |
| 17 | to={item.to} |
| 18 | end |
| 19 | className="flex flex-col items-center justify-center gap-1 px-6 py-2 text-muted-foreground transition-colors" |
| 20 | activeClassName="text-nav-active" |
| 21 | > |
| 22 | {({ isActive }) => ( |
| 23 | <> |
| 24 | <item.icon |
| 25 | className={`h-6 w-6 transition-all ${ |
| 26 | isActive ? "scale-110" : "" |
| 27 | }`} |
| 28 | /> |
| 29 | <span className="text-xs font-medium">{item.label}</span> |
| 30 | </> |
| 31 | )} |
| 32 | </NavLink> |
| 33 | ))} |
| 34 | </div> |
| 35 | </nav> |
| 36 | ); |
| 37 | }; |
| 38 | |
| 39 | export default BottomNav; |