mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-30 05:00:51 +08:00
20 lines
429 B
JavaScript
20 lines
429 B
JavaScript
import { Icon } from '@wordpress/components';
|
|
|
|
import data from '../../utils/data';
|
|
|
|
const PaymentMethodIcon = ( { icons, type } ) => {
|
|
const validIcon = Array.isArray( icons ) && icons.includes( type );
|
|
|
|
if ( validIcon || icons === 'all' ) {
|
|
return (
|
|
<Icon
|
|
icon={ data().getImage( 'icon-button-' + type + '.svg' ) }
|
|
className="ppcp--method-icon"
|
|
/>
|
|
);
|
|
}
|
|
|
|
return null;
|
|
};
|
|
|
|
export default PaymentMethodIcon;
|