2021-10-19 11:23:33 +00:00
|
|
|
/**
|
|
|
|
* External dependencies
|
|
|
|
*/
|
|
|
|
import { PaymentMethodIcons } from '@woocommerce/base-components/cart-checkout';
|
|
|
|
import { usePaymentMethods } from '@woocommerce/base-context/hooks';
|
2022-03-09 00:06:32 +00:00
|
|
|
import { getIconsFromPaymentMethods } from '@woocommerce/base-utils';
|
2021-10-19 11:23:33 +00:00
|
|
|
|
2021-10-25 15:31:22 +00:00
|
|
|
const Block = ( { className }: { className: string } ): JSX.Element => {
|
2021-10-19 11:23:33 +00:00
|
|
|
const { paymentMethods } = usePaymentMethods();
|
|
|
|
|
|
|
|
return (
|
|
|
|
<PaymentMethodIcons
|
2021-10-25 15:31:22 +00:00
|
|
|
className={ className }
|
2021-10-19 11:23:33 +00:00
|
|
|
icons={ getIconsFromPaymentMethods( paymentMethods ) }
|
|
|
|
/>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default Block;
|