I am using @paypal/paypal-js from npm in react app to integrate payment, any idea how to pass down style props in the button component that this library offers ?
// Style logic form paypal devoloper
paypal.Buttons({
style: {
layout: 'vertical',
color: 'blue',
shape: 'rect',
label: 'paypal'
}
}).render('#paypal-button-container');
// module
import React from 'react';
import { PayPalButtons } from '@paypal/react-paypal-js';
interface Props {}
export const PaypalCheckoutButtons: React.FC<Props> = ({}) => {
return <PayPalButtons />;
};
>Solution :
There are some examples in the documentation. For your case:
<PayPalButtons
style={{
layout: 'vertical',
color: 'blue',
shape: 'rect',
label: 'paypal'
}}
/>