UNPKG

@lanaco/lnc-react-ui

Version:

React component library

39 lines (38 loc) 793 B
import { jsx as f } from "react/jsx-runtime"; import { forwardRef as d, Children as u, isValidElement as x, cloneElement as g } from "react"; import S from "./FlexBox.js"; import h from "./FlexGridItem.js"; const y = d((e, t) => { const { columns: n = 12, spacing: o, rowSpacing: i, columnSpacing: m, justifyContent: l = "Start", alignItems: a = "Stretch", children: p, rest: c } = e, s = u.map(p, (r) => { if (!(!x(r) || r.type != h)) return g(r, { columns: n, spacing: o, rowSpacing: i, columnSpacing: m }); }); return /* @__PURE__ */ f( S, { ref: t, wrap: "Wrap", justifyContent: l, alignItems: a, ...c, children: s } ); }); export { y as default };