diff --git a/src/ui/IframeDialog.tsx b/src/ui/IframeDialog.tsx index 2652e70..5b36de4 100644 --- a/src/ui/IframeDialog.tsx +++ b/src/ui/IframeDialog.tsx @@ -32,6 +32,7 @@ export const IframeDialog = forwardRef( const [isDialogOpen, setIsDialogOpen] = useState(isOpen); const [dialogHeight, setDialogHeight] = useState('0px'); const [isHidden, setIsHideModal] = useState(false); + const [isIframeLoaded, setIsIframeLoaded] = useState(false); const handleOnMessage = (event: MessageEvent) => { if (event.data.dialogHeight) { @@ -78,26 +79,33 @@ export const IframeDialog = forwardRef( className="nfw-iframe" allowFullScreen allow="publickey-credentials-get *; clipboard-write" + onLoad={() => setIsIframeLoaded(true)} /> ) if (!isModal) { return isDialogOpen ? (
- + {isIframeLoaded && } {iframeElement}
) : null; } else { return isDesktop ? - + {iframeElement} : - + {iframeElement} diff --git a/src/ui/styles.css b/src/ui/styles.css index 35e2b9b..7ff6dc6 100644 --- a/src/ui/styles.css +++ b/src/ui/styles.css @@ -122,4 +122,5 @@ top: 10px; right: 10px; cursor: pointer; + opacity: 0.7; } \ No newline at end of file diff --git a/src/ui/styles.output.css b/src/ui/styles.output.css index c018035..1ad64b1 100644 --- a/src/ui/styles.output.css +++ b/src/ui/styles.output.css @@ -649,6 +649,10 @@ body { margin-top: 6rem; } +.block { + display: block; +} + .flex { display: flex; } @@ -793,6 +797,7 @@ body { top: 10px; right: 10px; cursor: pointer; + opacity: 0.7; } .hover\:opacity-100:hover {