UNPKG

laif-ds

Version:

Design System di Laif con componenti React basati su principi di Atomic Design

23 lines (22 loc) 684 B
"use client"; function f(e, l, n) { const h = n ? n.children : void 0, p = (h ? h.indexOf(l) : 1) === 0 ? "th" : "td", c = n && n.type === "table" ? n.align : void 0, u = c ? c.length : l.children.length; let r = -1; const s = []; for (; ++r < u; ) { const i = l.children[r], o = {}, a = c ? c[r] : void 0; a && (o.align = a); let t = { type: "element", tagName: p, properties: o, children: [] }; i && (t.children = e.all(i), e.patch(i, t), t = e.applyData(i, t)), s.push(t); } const d = { type: "element", tagName: "tr", properties: {}, children: e.wrap(s, !0) }; return e.patch(l, d), e.applyData(l, d); } export { f as tableRow };