mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2026-07-28 01:57:35 +08:00
Shared component that renders a Spinner while the preview is loading and a static text placeholder once the timeout elapses, replacing the duplicated inline conditional across all three block editors.
16 lines
446 B
JavaScript
16 lines
446 B
JavaScript
import { __ } from '@wordpress/i18n';
|
|
import { Spinner } from '@wordpress/components';
|
|
|
|
export function PreviewPlaceholder( { timedOut } ) {
|
|
if ( ! timedOut ) {
|
|
return <Spinner />;
|
|
}
|
|
return (
|
|
<p className="ppcp-paylater-preview-placeholder">
|
|
{ __(
|
|
'Pay Later messaging preview unavailable in editor. Messaging will display on the frontend when eligibility conditions are met.',
|
|
'woocommerce-paypal-payments'
|
|
) }
|
|
</p>
|
|
);
|
|
}
|