mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-24 09:28:31 +00:00
* [improvement] Widget components #1475 - iframe widget (#1493) * Bump ToolJet version to v0.11.1 Co-authored-by: Arpit <arpitnath42@gmail.com>
20 lines
593 B
JavaScript
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>
|
|
);
|
|
};
|