@anoki/fse-ui
Version:
FSE UI components library
89 lines (88 loc) • 2.65 kB
JavaScript
import { j as e } from "./index.es244.js";
import './components/ui/ActionBanner/ActionBanner.css';/* empty css */
import { ArrowLink as h } from "./index.es42.js";
import { Button as m } from "./index.es28.js";
import { Shape as d } from "./index.es193.js";
import { LinkTypeEnum as t } from "./index.es124.js";
import { Link as i } from "./index.es99.js";
import { ExternalLink as n } from "./index.es159.js";
var E = /* @__PURE__ */ ((s) => (s.DEFAULT = "default", s.OUTLINE = "outline", s.SIMPLE = "simple", s))(E || {});
const k = ({
title: s,
description: x,
variant: p = "default",
withIcon: j = !1,
link: r,
firstAction: a,
secondAction: l
}) => /* @__PURE__ */ e.jsxs("div", { className: `action-banner action-banner-${p}`, children: [
/* @__PURE__ */ e.jsx("div", { className: "banner-head", children: /* @__PURE__ */ e.jsx("div", { className: "banner-title", children: s }) }),
/* @__PURE__ */ e.jsxs("div", { className: "banner-body", children: [
j && /* @__PURE__ */ e.jsx("div", { className: "banner-icon", children: /* @__PURE__ */ e.jsx(d, {}) }),
/* @__PURE__ */ e.jsx("span", { className: "banner-description", children: x })
] }),
/* @__PURE__ */ e.jsxs("div", { className: "banner-actions", children: [
r && (r == null ? void 0 : r.title) && (r.linkType === t.EXTERNAL ? /* @__PURE__ */ e.jsx(
i,
{
title: r.title,
src: r.link,
icon: n,
external: !0
}
) : /* @__PURE__ */ e.jsx(
h,
{
asLink: "a",
children: r.title,
href: r.link,
isExternal: !1
}
)),
a && (a == null ? void 0 : a.title) && (a.linkType === t.EXTERNAL ? /* @__PURE__ */ e.jsx(
i,
{
title: a.title,
src: a.link,
icon: n,
decoration: "ui-footer-logo-link",
transform: "none",
external: !0
}
) : /* @__PURE__ */ e.jsx(
m,
{
variant: "secondary",
className: "left-button",
asLink: "a",
href: a.link,
isExternal: !1,
children: a.title
}
)),
l && (l == null ? void 0 : l.title) && (l.linkType === t.EXTERNAL ? /* @__PURE__ */ e.jsx(
i,
{
title: l.title,
src: l.link,
icon: n,
transform: "none",
external: !0
}
) : /* @__PURE__ */ e.jsx(
m,
{
asLink: "a",
href: l.link,
border: "primary",
isExternal: !1,
children: l.title
}
))
] })
] });
export {
k as ActionBanner,
E as ActionBannerVariantEnum
};
//# sourceMappingURL=index.es96.js.map