@anoki/fse-ui
Version:
FSE UI components library
79 lines (78 loc) • 2.29 kB
JavaScript
import { j as e } from "./index.es278.js";
import { clsx as n } from "./index.es280.js";
import './components/ui/SupportBanner/SupportBanner.css';/* empty css */
import { useMemo as N } from "react";
import { CTA_COMPONENTS as y } from "./index.es494.js";
import { Col as w } from "./index.es82.js";
import { Row as g } from "./index.es219.js";
const M = ({
bannerType: s = "outline",
title: i,
description: l = "",
titleTag: u = "h1",
mainLayout: o = "layout1",
className: c = "",
classNameTitle: m = "",
classNameDescription: d = "",
links: t = [],
asLink: x = "a",
children: b
}) => {
const a = x, p = N(() => !t || t.length === 0 ? null : t.map((r, f) => {
const h = r.variant ?? (r.href ? "outlineButtonHref" : "button"), j = y(a)[h];
return /* @__PURE__ */ e.jsx("div", { className: "ui-banner-link", children: j(r) }, f);
}), [t, a]);
return /* @__PURE__ */ e.jsxs(
w,
{
br: "x4",
gap: "x16",
className: n(
c,
s === "outline" ? "ui-outline" : "bg-lightblue-a03",
"ui-banner shadow "
),
children: [
/* @__PURE__ */ e.jsx(
u,
{
className: n(
"ui-banner-title text-slate-20",
m || "fs-4 fw-bold"
),
children: i
}
),
/* @__PURE__ */ e.jsxs(
"main",
{
className: n(
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: n(
d,
o === "layout1" ? "ui-banner-description" : ""
),
children: l
}
),
/* @__PURE__ */ e.jsxs(g, { className: "ui-banner-row", children: [
b,
/* @__PURE__ */ e.jsx("div", { className: n("ui-banner-cta"), children: p })
] })
]
}
)
]
}
);
};
export {
M as SupportBanner
};
//# sourceMappingURL=index.es245.js.map