@anoki/fse-marche-ui
Version:
FSE UI components library
54 lines (53 loc) • 1.28 kB
JavaScript
import { j as e } from "./index.es137.js";
import { ArrowRight as o } from "./index.es91.js";
const j = ({
href: a,
asLink: i = "a",
isExternal: r = !1,
fs: l = "6",
children: n,
className: c = "",
onClick: m,
type: d = "button",
asButton: f,
...s
}) => {
const t = `max-w-fit text-decoration-none text-primary base-row align-items-center fw-bold gap-x8 hover-underline ${((p) => `fs-${p}`)(l)} ${c}`;
if (f)
return /* @__PURE__ */ e.jsxs(
"button",
{
className: `bg-transparent border-none ${t}`,
onClick: m,
type: d,
...s,
children: [
n,
/* @__PURE__ */ e.jsx(o, { color: "primary", width: 24, height: 24 })
]
}
);
const h = i;
return /* @__PURE__ */ e.jsxs(
h,
{
className: t,
href: a,
target: r ? "_blank" : void 0,
rel: r ? "noreferrer noopener" : void 0,
...s,
children: [
n,
r && /* @__PURE__ */ e.jsxs("span", { className: "visually-hidden", children: [
" ",
"(si apre in una nuova finestra)"
] }),
/* @__PURE__ */ e.jsx(o, { color: "primary", width: 24, height: 24 })
]
}
);
};
export {
j as ArrowLink
};
//# sourceMappingURL=index.es35.js.map