@anoki/fse-ui
Version:
FSE UI components library
74 lines (73 loc) • 2.11 kB
JavaScript
import { j as e } from "./index.es237.js";
import { clsx as t } from "./index.es239.js";
import './components/ui/SupportBanner/SupportBanner.css';/* empty css */
import { useMemo as j } from "react";
import { CTA_COMPONENTS as N } from "./index.es439.js";
import { Col as y } from "./index.es61.js";
const B = ({
bannerType: s = "outline",
title: i,
description: u = "",
titleTag: l = "h1",
mainLayout: o = "layout1",
className: c = "",
classNameTitle: m = "",
classNameDescription: d = "",
links: n = [],
asLink: x = "a"
}) => {
const a = x, b = j(() => !n || n.length === 0 ? null : n.map((r, p) => {
const f = r.variant ?? (r.href ? "outlineButtonHref" : "button"), h = N(a)[f];
return /* @__PURE__ */ e.jsx("div", { className: "ui-banner-link", children: h(r) }, p);
}), [n, a]);
return /* @__PURE__ */ e.jsxs(
y,
{
br: "x4",
gap: "x16",
className: t(
c,
s === "outline" ? "ui-outline" : "bg-lightblue-a03",
"ui-banner shadow "
),
children: [
/* @__PURE__ */ e.jsx(
l,
{
className: t(
"ui-banner-title text-slate-20",
m || "fs-4 fw-bold"
),
children: i
}
),
/* @__PURE__ */ e.jsxs(
"main",
{
className: t(
o === "layout1" ? "ui-banner-content-layout1 fs-6 text-secondary justify-content-between " : "ui-banner-content-layout2",
"ui-banner-content fs-6 text-secondary w-100"
),
children: [
/* @__PURE__ */ e.jsx(
"div",
{
className: t(
d,
o === "layout1" ? "ui-banner-description" : ""
),
children: u
}
),
/* @__PURE__ */ e.jsx("div", { className: t("ui-banner-cta"), children: b })
]
}
)
]
}
);
};
export {
B as SupportBanner
};
//# sourceMappingURL=index.es126.js.map