getAlby / bitcoin-connect

Connecting lightning wallets to your webapp has never been easier. Enable WebLN in all browsers with a single button
https://bitcoin-connect.com
MIT License
79 stars 26 forks source link

Add Customization Options for Payment Methods in Payment Request Modal #213

Closed positiveblue closed 2 months ago

positiveblue commented 2 months ago

This pull request introduces a new feature that allows customization of the payment methods displayed in the payment request modal.

The bc-send-payment component now accepts a paymentMethods property, which can be set to all (default), internal, or external

internal: Shows only the internal payment methods (connecting a wallet). external: Displays only the external payment methods (QR code and invoice). all: Displays both internal payment methods (connecting a wallet) and external payment methods (QR code and invoice).

The layout and spacing of the payment methods have been adjusted to ensure a consistent and visually appealing design, regardless of the selected payment options.

To use this feature, set the payment-methods property on the bc-send-payment component to the desired value:

<bc-send-payment paymentMethods="all|internal|external"></bc-send-payment>

The changes have been added to the dev/vita index, so you can see the results by running yarn dev.

Fix #212

rolznz commented 2 months ago

Hi @positiveblue , thanks for your PR!

I was unable to edit your branch so I have made some improvements here: https://github.com/getAlby/bitcoin-connect/pull/214