mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
✨ Add new prop to the SpinnerOverlay
This commit is contained in:
parent
68644c3d62
commit
f6d1c80557
1 changed files with 7 additions and 2 deletions
|
@ -1,13 +1,18 @@
|
|||
import { __ } from '@wordpress/i18n';
|
||||
import { Spinner } from '@wordpress/components';
|
||||
import classnames from 'classnames';
|
||||
|
||||
const SpinnerOverlay = ( { asModal = false, message = null } ) => {
|
||||
const className = classnames( 'ppcp-r-spinner-overlay', {
|
||||
'ppcp--is-modal': asModal,
|
||||
} );
|
||||
|
||||
const SpinnerOverlay = ( { message = null } ) => {
|
||||
if ( null === message ) {
|
||||
message = __( 'Loading…', 'woocommerce-paypal-payments' );
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="ppcp-r-spinner-overlay">
|
||||
<div className={ className }>
|
||||
{ message && (
|
||||
<span className="ppcp--spinner-message">{ message }</span>
|
||||
) }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue