source: trip-planner-front/node_modules/@babel/runtime/helpers/jsx.js@ 6a80231

Last change on this file since 6a80231 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.2 KB
Line 
1var REACT_ELEMENT_TYPE;
2
3function _createRawReactElement(type, props, key, children) {
4 if (!REACT_ELEMENT_TYPE) {
5 REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol["for"] && Symbol["for"]("react.element") || 0xeac7;
6 }
7
8 var defaultProps = type && type.defaultProps;
9 var childrenLength = arguments.length - 3;
10
11 if (!props && childrenLength !== 0) {
12 props = {
13 children: void 0
14 };
15 }
16
17 if (childrenLength === 1) {
18 props.children = children;
19 } else if (childrenLength > 1) {
20 var childArray = new Array(childrenLength);
21
22 for (var i = 0; i < childrenLength; i++) {
23 childArray[i] = arguments[i + 3];
24 }
25
26 props.children = childArray;
27 }
28
29 if (props && defaultProps) {
30 for (var propName in defaultProps) {
31 if (props[propName] === void 0) {
32 props[propName] = defaultProps[propName];
33 }
34 }
35 } else if (!props) {
36 props = defaultProps || {};
37 }
38
39 return {
40 $$typeof: REACT_ELEMENT_TYPE,
41 type: type,
42 key: key === undefined ? null : "" + key,
43 ref: null,
44 props: props,
45 _owner: null
46 };
47}
48
49module.exports = _createRawReactElement;
50module.exports["default"] = module.exports, module.exports.__esModule = true;
Note: See TracBrowser for help on using the repository browser.