reactjs – Render paypal into existing button


I am integrating paypal into my website. I followed instructions on their documentation and everything is working fine except part that I must use paypal button for rendering.
So is it possible to render paypal on my existing button instead of creating new one?

 async function showPaypal(values, order) {
    
         let chargeamount= numformat((Number(user.deliverycost)))
      

        setShowpaypal(true)

        window.paypal.Buttons({
            createOrder: function (data, actions) {
                // This function sets up the details of the transaction, including the amount and line item details.
                return actions.order.create({
                    purchase_units: ({
                        amount: {
                            value: chargeamount
                        }
                    })
                });
            },
            onApprove: function (data, actions) {
                // This function captures the funds from the transaction.
                
                return actions.order.capture().then(async function (details) {
                    // This function shows a transaction success message to your buyer.

                     navigate("/done?order=" + order);

                    // alert('Transaction completed by ' + details.payer.name.given_name);
                });
            }
        }).render('#paypal-button-container');

    }

Then I want to render it when user click on pay button

 <Button
                    className="primary-button"
                    variant="contained"
                    type="submit"
                    size="medium"
                    color="primary"
                    style={{height: "60px"}}
                   id="paypal-button-container"
                >
                      Pay
          </Button>

I have error

Error: Do not render the PayPal button into a button element

But I strictly want to use this button for calling paypal, is it possible to overcome this error but to still use this button for paying?