ToolJet/frontend/src/Editor/Components/IFrame.jsx
Sherfin Shamsudeen eec622e91c
Hotfix/iframe new api (#1557)
* [improvement] Widget components #1475 - iframe widget (#1493)

* Bump ToolJet version to v0.11.1

Co-authored-by: Arpit <arpitnath42@gmail.com>
2021-12-10 12:52:41 +05:30

20 lines
593 B
JavaScript

import React from 'react';
export const IFrame = function IFrame({ width, height, properties, styles }) {
const source = properties.source;
const { visibility, disabledState } = styles;
return (
<div data-disabled={disabledState} style={{ display: visibility ? '' : 'none' }}>
<iframe
width={width - 4}
height={height}
src={source}
title="IFrame Widget"
frameBorder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowFullScreen
></iframe>
</div>
);
};