Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Pass to payment methods a wrapper component that handles the loading state #5135

Merged
merged 1 commit into from
Nov 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import PaymentMethodLabel from '@woocommerce/base-components/cart-checkout/payme
import PaymentMethodIcons from '@woocommerce/base-components/cart-checkout/payment-method-icons';
import { getSetting } from '@woocommerce/settings';
import deprecated from '@wordpress/deprecated';
import LoadingMask from '@woocommerce/base-components/loading-mask';

/**
* Internal dependencies
Expand Down Expand Up @@ -126,6 +127,7 @@ export const usePaymentMethodInterface = (): Record< string, unknown > => {
ValidationInputError,
PaymentMethodIcons,
PaymentMethodLabel,
LoadingMask,
},
emitResponse: {
noticeContexts,
Expand Down
2 changes: 2 additions & 0 deletions assets/js/types/type-defs/registered-payment-method-props.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@
* method icons.
* @property {function(Object):Object} PaymentMethodLabel A component used for displaying payment
* method labels, including an icon.
* @property {function(Object):Object} LoadingMask A wrapper component used for showing a
* loading state when the isLoading prop is true.
*/

/**
Expand Down
Loading