UNPKG

@native-html/iframe-plugin

Version:

🌐 A WebView-based plugin to render iframes in react-native-render-html

29 lines (26 loc) 870 B
import React from 'react'; import { defaultHTMLElementModels, HTMLContentModel } from 'react-native-render-html'; import useHtmlIframeProps from './useHtmlIframeProps'; import HTMLIframe from './HTMLIframe'; /** * The renderer component for the iframe element. This renderer is fully * scalable, and will adjust to `contentWidth` and `computeEmbeddedMaxWidth`. * It also features `onLinkPress`. * * @public */ const IframeRenderer = function IframeRenderer(props) { const iframeProps = useHtmlIframeProps(props); return /*#__PURE__*/React.createElement(HTMLIframe, iframeProps); }; /** * The model to attach to custom iframe renderers. * * @public */ export const iframeModel = defaultHTMLElementModels.iframe.extend({ contentModel: HTMLContentModel.block, isOpaque: true }); export default IframeRenderer; //# sourceMappingURL=IframeRenderer.js.map