// Navbar function Navbar({ active, onNav }) { const [scrolled, setScrolled] = useState(false); const [open, setOpen] = useState(false); useEffect(() => { const onScroll = () => setScrolled(window.scrollY > 20); window.addEventListener('scroll', onScroll); return () => window.removeEventListener('scroll', onScroll); }, []); const links = [ { id: 'inicio', label: 'Inicio' }, { id: 'portafolio', label: 'Portafolio' }, { id: 'estilos', label: 'Estilos' }, { id: 'tienda', label: 'Tienda' }, { id: 'sobre-mi', label: 'Sobre mí' }, { id: 'contacto', label: 'Contacto' }, ]; return (
ISFER 502
{links.map(l => ( onNav && onNav(l.id)} style={{ fontFamily: 'var(--font-accent)', fontSize: 13, letterSpacing: '0.25em', color: active === l.id ? 'var(--white)' : 'var(--gray)', textTransform: 'uppercase', position: 'relative', paddingBottom: 4, borderBottom: active === l.id ? '1px solid var(--ink-red-bright)' : '1px solid transparent', }} onMouseEnter={(e) => e.currentTarget.style.color = 'var(--white)'} onMouseLeave={(e) => e.currentTarget.style.color = active === l.id ? 'var(--white)' : 'var(--gray)'} > {l.label.toUpperCase()} ))} Agendar cita
{open && ( {links.map(l => ( { onNav && onNav(l.id); setOpen(false); }} style={{ fontFamily: 'var(--font-accent)', fontSize: 16, letterSpacing: '0.25em', color: 'var(--white)', textTransform: 'uppercase' }} >{l.label} ))} Agendar cita )}
); } window.Navbar = Navbar;