import {__} from '@wordpress/i18n'; import {ReceiptDetail} from '@givewp/forms/types'; import {DonationReceiptProps} from '@givewp/forms/propTypes'; import {Interweave} from 'interweave'; /** * @since 4.3.2 include aria-live and role attributes to the secure badge for screen readers. * @since 3.0.0 */ const SecureBadge = () => { return ( ); }; /** * @since 4.3.2 replace
tag with
. The
element is reserved for definition lists, the content here represents labeled key-value pairs. * @since 3.4.0 updated to render value using Interweave * @since 3.0.0 */ const Details = ({id, heading, details}: {id: string; heading: string; details: ReceiptDetail[]}) => details?.length > 0 && (

{heading}

{details.map(({label, value}, index) => (
{label}
))}
); /** * @since 3.0.0 */ export default function DonationReceipt({ heading, description, donorDashboardUrl, pdfReceiptLink, donorDetails, donationDetails, subscriptionDetails, eventTicketsDetails, additionalDetails, }: DonationReceiptProps) { return ( ); }