Skip to content

Commit

Permalink
fix: add title to form block preview iframe-resizers
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaHungDinh committed Jan 23, 2025
1 parent 15b3c98 commit f3f5ef7
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import IframeResizer from 'iframe-resizer-react';
import {useSelect} from '@wordpress/data';
import {useState} from '@wordpress/element';
import {__} from '@wordpress/i18n';
import FormModal from '../../common/FormModal';

import '../styles/index.scss';
import FormModal from '../../common/FormModal';
import {useState} from '@wordpress/element';

/**
* @since 3.2.1 Revert the display style value of "fullForm" to "onpage"
Expand Down Expand Up @@ -46,6 +47,7 @@ export default function DonationFormBlockPreview({
) : isModalDisplay ? (
<FormModal openFormButton={openFormButton} isOpen={isOpen} onChange={() => setIsOpen(!isOpen)}>
<IframeResizer
title={__('Donation Form', 'give')}
src={`/?givewp-route=donation-form-view&form-id=${formId}`}
checkOrigin={false}
style={{
Expand All @@ -56,6 +58,7 @@ export default function DonationFormBlockPreview({
</FormModal>
) : (
<IframeResizer
title={__('Donation Form', 'give')}
src={`/?givewp-route=donation-form-view&form-id=${formId}`}
checkOrigin={false}
style={{
Expand Down

0 comments on commit f3f5ef7

Please sign in to comment.