UNPKG

@cerberus-design/react

Version:

The Cerberus Design React component library.

20 lines (15 loc) 583 B
'use strict'; Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); const jsxRuntime = require('react/jsx-runtime'); function Show(props) { const { when, children, fallback } = props; if (when) { if (typeof children === "function") { return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: children() }); } return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children }); } if (fallback) return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: fallback }); return null; } exports.Show = Show;