Repository URL to install this package:
|
Version:
2.7.3 ▾
|
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
const tslib_1 = require("tslib");
const react_1 = tslib_1.__importDefault(require("react"));
const styled_1 = require("./styled");
class IFrame extends react_1.default.PureComponent {
render() {
const _a = this.props,
{
width,
height,
nowrap
} = _a,
remainingProps = tslib_1.__rest(_a, ["width", "height", "nowrap"]);
const wrapperProps = {
width,
height
};
if (nowrap === true) {
return react_1.default.createElement(styled_1.StyledIFrame, Object.assign({}, remainingProps));
} else {
return react_1.default.createElement(styled_1.StyledIFrameWrap, Object.assign({}, wrapperProps), react_1.default.createElement(styled_1.StyledIFrame, Object.assign({}, remainingProps)));
}
}
}
IFrame.defaultProps = {
src: '',
layout: 'responsive',
sandbox: 'allow-scripts allow-same-origin allow-popups',
frameBorder: '0',
width: '70%',
height: '500px',
nowrap: false
};
exports.IFrame = IFrame;
exports.default = IFrame; //# sourceMappingURL=IFrame.js.map