UNPKG

@yookue/react-condition

Version:

Render components conditionally for react

15 lines 475 B
import React from 'react'; import { jsx as _jsx } from "react/jsx-runtime"; export var SetIterator = function SetIterator(props) { return Array.from(props.of).map(function (item, index) { if (props.render) { return props.render(item, index); } else if (!props.render && props.children) { return /*#__PURE__*/_jsx("div", { className: "condition-set-iterator", children: props.children }, index); } return undefined; }); };