UNPKG

@anoki/fse-ui

Version:

FSE UI components library

60 lines (59 loc) 1.93 kB
import { j as r } from "./index.es244.js"; import { Attachment as i } from "./index.es197.js"; import { Button as o } from "./index.es28.js"; import { ArrowLink as t } from "./index.es42.js"; const u = { /** * Renders a link component with optional action handler */ link: ({ text: s, href: e, handleAction: l }) => l ? /* @__PURE__ */ r.jsx(t, { asButton: !0, onClick: l, children: s }) : /* @__PURE__ */ r.jsx(t, { href: e, children: s }), /** * Renders a basic button component */ button: ({ text: s, icon: e, handleAction: l }) => /* @__PURE__ */ r.jsxs(o, { size: "2", className: "w-full ", onClick: l, children: [ e && /* @__PURE__ */ r.jsx(i, { className: "mr-x8" }), /* @__PURE__ */ r.jsx("p", { className: "fs-6 fw-bold", children: s }) ] }), /** * Renders an outline button with optional icon and action handler */ outlineButton: ({ text: s, icon: e, handleAction: l }) => /* @__PURE__ */ r.jsxs( o, { size: "2", textColor: "primary", bg: "lightblue-a03", className: "w-full ", border: "primary", onClick: l, children: [ e && /* @__PURE__ */ r.jsx(i, { className: "mr-x8" }), /* @__PURE__ */ r.jsx("p", { className: "fs-6 fw-bold", children: s }) ] } ), /** * Renders an outline button that acts as a link */ outlineButtonHref: ({ text: s, href: e, icon: l, target: a, isExternal: m }) => /* @__PURE__ */ r.jsxs( o, { size: "2", textColor: "primary", bg: "lightblue-a03", className: "w-full ", border: "primary", asLink: "a", target: a ?? (m ? "_blank" : void 0), href: e ?? "", children: [ l && /* @__PURE__ */ r.jsx(i, { className: "mr-x8" }), /* @__PURE__ */ r.jsx("p", { className: "fs-6 fw-bold", children: s }) ] } ) }; export { u as CTA_COMPONENTS }; //# sourceMappingURL=index.es313.js.map