Create payment methods list

This commit is contained in:
inpsyde-maticluznar 2024-10-29 12:39:44 +01:00
parent 3a9f2a4a1f
commit 5d38233923
No known key found for this signature in database
GPG key ID: D005973F231309F6
21 changed files with 398 additions and 1 deletions

View file

@ -0,0 +1,27 @@
import { Modal } from '@wordpress/components';
import PaymentMethodIcon from './PaymentMethodIcon';
const PaymentMethodModal = ( props ) => {
let className = 'ppcp-r-modal';
if ( props?.className ) {
className += ' ' + props.className;
}
return (
<Modal
className={ className }
onRequestClose={ () => props.setModalIsVisible( false ) }
>
<div className="ppcp-r-modal__header">
<PaymentMethodIcon
icons={ [ props.icon ] }
type={ props.icon }
/>
<span className="ppcp-r-modal__title">{ props.title }</span>
</div>
<div className="ppcp-r-modal__content">{ props.children }</div>
</Modal>
);
};
export default PaymentMethodModal;