"use client"; import { cn } from "@/lib/utils"; import { IconMenu2, IconX } from "@tabler/icons-react"; import { motion, AnimatePresence } from "motion/react"; import Image from "next/image"; import Link from "next/link"; import React, { useState } from "react"; export function SimpleNavbarWithHoverEffects() { return ; } const Navbar = () => { const navItems = [ { name: "Work", link: "#" }, { name: "Services", link: "#" }, { name: "Pricing", link: "#" }, { name: "Contact", link: "#" }, ]; return (
); }; const DesktopNav = ({ navItems }: any) => { const [hovered, setHovered] = useState(null); return ( { setHovered(null); }} className={cn( "relative z-[60] mx-auto hidden w-full max-w-7xl flex-row items-center justify-between self-start rounded-full bg-white px-4 py-2 lg:flex dark:bg-neutral-950", "sticky inset-x-0 top-40" )} >
{navItems.map((navItem: any, idx: number) => ( setHovered(idx)} className="relative px-4 py-2 text-neutral-600 dark:text-neutral-300" key={`link=${idx}`} href={navItem.link} > {hovered === idx && ( )} {navItem.name} ))}
); }; const MobileNav = ({ navItems }: any) => { const [open, setOpen] = useState(false); return ( <>
{open ? ( setOpen(!open)} /> ) : ( setOpen(!open)} /> )}
{open && ( {navItems.map((navItem: any, idx: number) => ( {navItem.name} ))} )}
); }; const Logo = () => { return ( logo DevStudio ); };