@anoki/fse-ui
Version:
FSE UI components library
89 lines (88 loc) • 2.54 kB
JavaScript
import { j as e } from "./index.es244.js";
import { clsx as l } from "./index.es246.js";
import { ActionIconText as d } from "./index.es67.js";
import './components/ui/NotificationsSettingsHeader/NotificationsSettingsHeader.css';/* empty css */
import { Info as c } from "./index.es200.js";
const j = ({
className: a,
showEmail: o = !1,
showSms: n = !1,
...r
}) => {
const t = [
{
label: "Categoria notifica",
noIcon: !0,
isFlex: !0,
key: "category",
alwaysVisible: !0
},
{
label: "SMS",
fixedWidth: !0,
key: "sms",
visible: n,
popupInfo: {
title: "SMS",
description: "SMS come metodo di notifica",
isOpen: !1,
onClickCloseBtn: () => {
}
}
},
{
label: "Email",
fixedWidth: !0,
key: "email",
visible: o,
popupInfo: {
title: "Email",
description: "Email come metodo di notifica",
isOpen: !1,
onClickCloseBtn: () => {
}
}
}
].filter(
(i) => i.alwaysVisible || i.visible
);
return /* @__PURE__ */ e.jsxs("div", { children: [
/* @__PURE__ */ e.jsx("div", { className: l(a), ...r, children: /* @__PURE__ */ e.jsx("table", { className: "w-full flex", children: /* @__PURE__ */ e.jsx("thead", { children: /* @__PURE__ */ e.jsx("tr", { className: "w-full flex", children: t.map((i, s) => /* @__PURE__ */ e.jsx(
"th",
{
className: l(
"table-header-divider-cell w-full",
i.isFlex ? "flex-1" : "flex-none"
),
children: /* @__PURE__ */ e.jsx(
"div",
{
className: l(
"table__cell--header--content",
i.fixedWidth ? "table-header-fixed-width " : ""
),
children: /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx(
d,
{
classNameText: "text-grey-black",
noIcon: i.noIcon,
icon: /* @__PURE__ */ e.jsx(c, {}),
textLabel: i.label,
iconPosition: "right",
popupInfo: i.popupInfo,
positionPopUp: t.length === s + 1 ? "left" : "right"
}
) })
}
)
},
`${i.label}-${s}`
)) }) }) }) }),
/* @__PURE__ */ e.jsx("div", { className: "table-header-divider" })
] });
};
export {
j as NotificationsSettingsHeader,
j as default
};
//# sourceMappingURL=index.es79.js.map