chore: super conversion dialog (#2669)

This commit is contained in:
Mo
2023-11-30 10:50:15 -06:00
committed by GitHub
parent 394ed65e11
commit 8790f97e2d
4 changed files with 31 additions and 7 deletions

View File

@@ -21,6 +21,7 @@ interface Props {
requestReload?: (viewer: ComponentViewerInterface, force?: boolean) => void
onLoad?: () => void
readonly?: boolean
usedInModal?: boolean
}
/**
@@ -31,7 +32,13 @@ const MaxLoadThreshold = 4000
const VisibilityChangeKey = 'visibilitychange'
const MSToWaitAfterIframeLoadToAvoidFlicker = 35
const IframeFeatureView: FunctionComponent<Props> = ({ onLoad, componentViewer, requestReload, readonly = false }) => {
const IframeFeatureView: FunctionComponent<Props> = ({
onLoad,
componentViewer,
requestReload,
readonly = false,
usedInModal = false,
}) => {
const application = useApplication()
const iframeRef = useRef<HTMLIFrameElement | null>(null)
@@ -241,6 +248,7 @@ const IframeFeatureView: FunctionComponent<Props> = ({ onLoad, componentViewer,
frameBorder={0}
src={componentViewer.url || ''}
sandbox={sandboxAttributes.join(' ')}
{...(usedInModal && { 'data-used-in-modal': true })}
>
Loading
</iframe>