koval-ui
Version:
React components collection with minimalistic design. Supports theming, layout, and input validation.
47 lines (46 loc) • 1.11 kB
JavaScript
"use client";
import { jsxs as l, jsx as t } from "react/jsx-runtime";
import { useId as d } from "react";
import r from "classnames";
import { ActionButton as p } from "./ActionButton.js";
import s from "./ActionButton.module.css.js";
const j = ({
actions: c = [],
classNameRow: m,
classNameAction: e,
actionComponent: o = p
}) => {
const a = d();
return c.map((i, n) => {
if (Array.isArray(i)) {
const [u, f] = i;
return /* @__PURE__ */ l("div", { className: r(s.row, m), children: [
/* @__PURE__ */ t(
o,
{
...u,
className: r(s.actionButton, e)
}
),
/* @__PURE__ */ t(
o,
{
...f,
className: r(s.actionButton, e)
}
)
] }, `${a}-${n}`);
} else
return /* @__PURE__ */ t("div", { className: r(s.row, m), children: /* @__PURE__ */ t(
o,
{
...i,
className: r(s.actionButton, e)
}
) }, `${a}-${n}`);
});
};
export {
j as ActionsTree
};
//# sourceMappingURL=ActionsTree.js.map