UNPKG

@anoki/fse-marche-ui

Version:

FSE UI components library

41 lines (40 loc) 1.36 kB
import { j as s } from "./index.es137.js"; import { clsx as r } from "./index.es139.js"; import './components/navigations/TabBar/TabBar.css';/* empty css */ import { Row as i } from "./index.es9.js"; const x = ({ navigatonItems: o, asLink: n = "a", className: e }) => { const c = n; return /* @__PURE__ */ s.jsx("nav", { className: r("bg-white ui-tab-bar shadow", e), children: /* @__PURE__ */ s.jsx(i, { as: "ul", className: "list-style-none ui-tab-bar-list", role: "list", children: o.map((a, t) => { const l = a == null ? void 0 : a.icon; return /* @__PURE__ */ s.jsx("li", { className: "ui-tab-bar-item", children: /* @__PURE__ */ s.jsxs( c, { href: a.href, "aria-label": `Vai alla pagina ${a.label}`, className: r( "text-decoration-none text-secondary fs-8 fw-bold", a.active && "active" ), children: [ l && /* @__PURE__ */ s.jsx( l, { color: a.active ? "primary" : "secondary", filled: !!a.active } ), a.shortLabel ? a.shortLabel : a.label, a.active && /* @__PURE__ */ s.jsx("span", { className: "visually-hidden", children: "Attivo" }) ] } ) }, t); }) }) }); }; export { x as TabBar }; //# sourceMappingURL=index.es20.js.map