UNPKG

@primer/react

Version:

An implementation of GitHub's Primer Design System using React

54 lines (51 loc) 985 B
import { c } from 'react-compiler-runtime'; import { jsx, Fragment } from 'react/jsx-runtime'; const ConditionalWrapper = props => { const $ = c(9); let children; let condition; let rest; if ($[0] !== props) { ({ if: condition, children, ...rest } = props); $[0] = props; $[1] = children; $[2] = condition; $[3] = rest; } else { children = $[1]; condition = $[2]; rest = $[3]; } if (condition) { let t0; if ($[4] !== children || $[5] !== rest) { t0 = /*#__PURE__*/jsx("div", { ...rest, children: children }); $[4] = children; $[5] = rest; $[6] = t0; } else { t0 = $[6]; } return t0; } else { let t0; if ($[7] !== children) { t0 = /*#__PURE__*/jsx(Fragment, { children: children }); $[7] = children; $[8] = t0; } else { t0 = $[8]; } return t0; } }; export { ConditionalWrapper };