UNPKG

@cerberus-design/react

Version:

The Cerberus Design React component library.

16 lines (13 loc) 426 B
import { jsx, Fragment } from 'react/jsx-runtime'; function Show(props) { const { when, children, fallback } = props; if (when) { if (typeof children === "function") { return /* @__PURE__ */ jsx(Fragment, { children: children() }); } return /* @__PURE__ */ jsx(Fragment, { children }); } if (fallback) return /* @__PURE__ */ jsx(Fragment, { children: fallback }); return null; } export { Show };