exports.js 764 B

12345678910111213141516171819202122
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.exportSidecar = void 0;
  4. var tslib_1 = require("tslib");
  5. var React = tslib_1.__importStar(require("react"));
  6. var SideCar = function (_a) {
  7. var sideCar = _a.sideCar, rest = tslib_1.__rest(_a, ["sideCar"]);
  8. if (!sideCar) {
  9. throw new Error('Sidecar: please provide `sideCar` property to import the right car');
  10. }
  11. var Target = sideCar.read();
  12. if (!Target) {
  13. throw new Error('Sidecar medium not found');
  14. }
  15. return React.createElement(Target, tslib_1.__assign({}, rest));
  16. };
  17. SideCar.isSideCarExport = true;
  18. function exportSidecar(medium, exported) {
  19. medium.useMedium(exported);
  20. return SideCar;
  21. }
  22. exports.exportSidecar = exportSidecar;