UNPKG

@medalsocial/meda

Version:

Shared Meda UI shell and runtime package.

11 lines (10 loc) 920 B
'use client'; import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { ChevronDown } from 'lucide-react'; import { cx } from './utils.js'; export function MarketingNavItem({ id, label, className, open = false, onToggle, ...rest }) { if (rest.hasMenu) { return (_jsxs("button", { type: "button", "data-nav-id": id, id: id, "aria-expanded": open, "aria-haspopup": "menu", onClick: onToggle, className: cx('inline-flex items-center gap-1 rounded-full px-3 py-1.5 text-sm text-foreground/80 hover:text-foreground', className), children: [label, _jsx(ChevronDown, { "data-chevron": true, className: cx('h-3.5 w-3.5 transition', open && 'rotate-180'), "aria-hidden": true })] })); } return (_jsx("a", { href: rest.href, "data-nav-id": id, className: cx('inline-flex items-center rounded-full px-3 py-1.5 text-sm text-foreground/80 hover:text-foreground', className), children: label })); }