UNPKG

1 kBJavaScriptView Raw
1"use strict";
2var __importStar = (this && this.__importStar) || function (mod) {
3 if (mod && mod.__esModule) return mod;
4 var result = {};
5 if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
6 result["default"] = mod;
7 return result;
8};
9var __importDefault = (this && this.__importDefault) || function (mod) {
10 return (mod && mod.__esModule) ? mod : { "default": mod };
11};
12Object.defineProperty(exports, "__esModule", { value: true });
13const React = __importStar(require("react"));
14const Connect_1 = __importDefault(require("./Connect"));
15const withInvoke_1 = require("./withInvoke");
16const Factory = (integrationId) => {
17 const withInvoke = function (functionName) {
18 return withInvoke_1.withInvoke(integrationId, functionName);
19 };
20 return {
21 withInvoke,
22 Connect: (props) => React.createElement(Connect_1.default, Object.assign({}, props, { integration: integrationId }))
23 };
24};
25exports.default = Factory;