jsx.js 1.2 KB

123456789101112131415161718192021222324
  1. var _Symbol = require("@babel/runtime-corejs3/core-js/symbol");
  2. var _Symbol$for = require("@babel/runtime-corejs3/core-js/symbol/for");
  3. var REACT_ELEMENT_TYPE;
  4. function _createRawReactElement(type, props, key, children) {
  5. REACT_ELEMENT_TYPE || (REACT_ELEMENT_TYPE = "function" == typeof _Symbol && _Symbol$for && _Symbol$for("react.element") || 60103);
  6. var defaultProps = type && type.defaultProps,
  7. childrenLength = arguments.length - 3;
  8. if (props || 0 === childrenLength || (props = {
  9. children: void 0
  10. }), 1 === childrenLength) props.children = children;else if (childrenLength > 1) {
  11. for (var childArray = new Array(childrenLength), i = 0; i < childrenLength; i++) childArray[i] = arguments[i + 3];
  12. props.children = childArray;
  13. }
  14. if (props && defaultProps) for (var propName in defaultProps) void 0 === props[propName] && (props[propName] = defaultProps[propName]);else props || (props = defaultProps || {});
  15. return {
  16. $$typeof: REACT_ELEMENT_TYPE,
  17. type: type,
  18. key: void 0 === key ? null : "" + key,
  19. ref: null,
  20. props: props,
  21. _owner: null
  22. };
  23. }
  24. module.exports = _createRawReactElement, module.exports.__esModule = true, module.exports["default"] = module.exports;