diff --git a/libs/paystack-button.tsx b/libs/paystack-button.tsx index 8d66820..833c288 100644 --- a/libs/paystack-button.tsx +++ b/libs/paystack-button.tsx @@ -6,6 +6,7 @@ interface PaystackButtonProps extends PaystackProps { text?: string; className?: string; children?: ReactNode; + onClick?: Function; // a function that is run before the payment function, if true is returned proceed to the payment function onSuccess?: callback; onClose?: callback; } @@ -16,11 +17,20 @@ const PaystackButton = ({ children, onSuccess, onClose, + onClick, ...others }: PaystackButtonProps): JSX.Element => { const initializePayment = usePaystackPayment(others); return ( - );