UNPKG

fui-fancyui

Version:
33 lines (32 loc) 1.33 kB
"use client"; import { jsxs as o, jsx as t } from "react/jsx-runtime"; import s from "react"; import a from "../../atoms/Typography/Typography.js"; import h from "../../atoms/FancyLine/FancyLine.js"; import { StyledHeadLine as y, HeadLineWrapper as g, StyledHeadLineTitles as x, IconWrapper as L } from "./FancyModalHeadLine.style.js"; import N from "../../atoms/FancyXButton/FancyXButton.js"; function b(e) { const { title: r, subTitle: n, alignCenter: l = !1, hr: d, gapBetweenText: f = "xxs", onXButtonClick: i, ...u } = e, p = S(r), m = B(n); return /* @__PURE__ */ o(y, { ...u, children: [ /* @__PURE__ */ o(g, { children: [ /* @__PURE__ */ o(x, { $gapBetweenText: f, $alignCenter: l, children: [ r && p, n && m ] }), i && /* @__PURE__ */ t(L, { children: /* @__PURE__ */ t(N, { onClick: i }) }) ] }), d && (r || n) && /* @__PURE__ */ t(h, { direction: "horizontal" }) ] }); } function c(e) { return e ? !!s.isValidElement(e) : !1; } function S(e) { return e && typeof e == "string" ? /* @__PURE__ */ t(a, { variant: "bodytextLg", fontWeight: "bold", children: e }) : c(e) ? e : null; } function B(e) { return e && typeof e == "string" ? /* @__PURE__ */ t(a, { variant: "bodytextSm", fontWeight: "bold", children: e }) : c(e) ? e : null; } export { b as default };