Add bancontact component

This commit is contained in:
Emili Castells Guasch 2024-08-12 11:54:14 +02:00
parent 60885b2ad9
commit ce25dee734
4 changed files with 17 additions and 7 deletions

View file

@ -0,0 +1,9 @@
export function Bancontact( { config, components } ) {
const { PaymentMethodIcons } = components;
return (
<div>
<PaymentMethodIcons icons={ [ config.icon ] } align="right" />
</div>
);
}

View file

@ -1,12 +1,12 @@
import { registerPaymentMethod } from '@woocommerce/blocks-registry';
import { Bancontact } from './bancontact-block';
const config = wc.wcSettings.getSetting( 'ppcp-bancontact_data' );
console.log( config );
registerPaymentMethod( {
name: config.id,
label: <div dangerouslySetInnerHTML={ { __html: config.title } } />,
content: <div>Hi there!</div>,
content: <Bancontact config={ config } />,
edit: <div></div>,
ariaLabel: config.title,
canMakePayment: () => {