mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
24 lines
766 B
JavaScript
24 lines
766 B
JavaScript
import CardChangeButton from './../Card/CardChangeButton';
|
|
|
|
/**
|
|
* TitleLabel component for displaying a payment method title with icons and a change card button.
|
|
*
|
|
* @param {Object} props - Component props
|
|
* @param {Object} props.components - Object containing WooCommerce components
|
|
* @param {Object} props.config - Configuration object for the payment method
|
|
* @return {JSX.Element} WordPress element
|
|
*/
|
|
const TitleLabel = ( { components, config } ) => {
|
|
const axoConfig = window.wc_ppcp_axo;
|
|
const { PaymentMethodIcons } = components;
|
|
|
|
return (
|
|
<>
|
|
<span dangerouslySetInnerHTML={ { __html: config.title } } />
|
|
<PaymentMethodIcons icons={ axoConfig?.card_icons } />
|
|
<CardChangeButton />
|
|
</>
|
|
);
|
|
};
|
|
|
|
export default TitleLabel;
|