Outlook_Addin_LLM/node_modules/@fluentui/react-jsx-runtime/lib-commonjs/createElement.js

28 lines
1.2 KiB
JavaScript
Raw Permalink Normal View History

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "createElement", {
enumerable: true,
get: function() {
return createElement;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _reactutilities = require("@fluentui/react-utilities");
const _createElementFromSlotComponent = require("./jsx/createElementFromSlotComponent");
const _createCompatSlotComponent = require("./utils/createCompatSlotComponent");
function createElement(type, props, ...children) {
// TODO:
// this is for backwards compatibility with getSlotsNext
// it should be removed once getSlotsNext is obsolete
if ((0, _reactutilities.isSlot)(props)) {
return (0, _createElementFromSlotComponent.createElementFromSlotComponent)((0, _createCompatSlotComponent.createCompatSlotComponent)(type, props), children);
}
if ((0, _reactutilities.isSlot)(type)) {
return (0, _createElementFromSlotComponent.createElementFromSlotComponent)(type, children);
}
return /*#__PURE__*/ _react.createElement(type, props, ...children);
}