@pnp/spfx-controls-react
Version:
Reusable React controls for SharePoint Framework solutions
29 lines • 1.63 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.IFramePanel = void 0;
var tslib_1 = require("tslib");
var React = tslib_1.__importStar(require("react"));
var Panel_1 = require("@fluentui/react/lib/Panel");
var omit_1 = tslib_1.__importDefault(require("lodash/omit"));
var IFramePanelContent_1 = require("./IFramePanelContent");
var telemetry = tslib_1.__importStar(require("../../common/telemetry"));
var IFramePanel = /** @class */ (function (_super) {
tslib_1.__extends(IFramePanel, _super);
function IFramePanel(props) {
var _this = _super.call(this, props) || this;
telemetry.track('ReactIFramePanel', {});
_this.state = {};
return _this;
}
/**
* Default React render
*/
IFramePanel.prototype.render = function () {
var _a = this.props, height = _a.height, allowFullScreen = _a.allowFullScreen, iframeOnLoad = _a.iframeOnLoad, allowTransparency = _a.allowTransparency, name = _a.name, sandbox = _a.sandbox, scrolling = _a.scrolling, seamless = _a.seamless;
return (React.createElement(Panel_1.Panel, tslib_1.__assign({}, (0, omit_1.default)(this.props, 'className')),
React.createElement(IFramePanelContent_1.IFramePanelContent, { src: this.props.url, iframeOnLoad: iframeOnLoad, close: this.props.onDismiss, height: height, allowFullScreen: allowFullScreen, allowTransparency: allowTransparency, name: name, sandbox: sandbox, scrolling: scrolling, seamless: seamless })));
};
return IFramePanel;
}(React.Component));
exports.IFramePanel = IFramePanel;
//# sourceMappingURL=IFramePanel.js.map