@helpwave/hightide
Version:
helpwave's component and theming library
25 lines • 654 B
JavaScript
// src/components/layout-and-navigation/DividerInserter.tsx
import clsx from "clsx";
import { jsx } from "react/jsx-runtime";
var DividerInserter = ({
children,
divider,
className,
...restProps
}) => {
const nodes = [];
for (let index = 0; index < children.length; index++) {
const element = children[index];
if (element !== void 0) {
nodes.push(element);
if (index < children.length - 1) {
nodes.push(divider(index));
}
}
}
return /* @__PURE__ */ jsx("div", { className: clsx(className), ...restProps, children: nodes });
};
export {
DividerInserter
};
//# sourceMappingURL=DividerInserter.mjs.map