Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add bc-pay-button web component #157

Merged
merged 5 commits into from
Dec 20, 2023
Merged

feat: add bc-pay-button web component #157

merged 5 commits into from
Dec 20, 2023

Conversation

rolznz
Copy link
Collaborator

@rolznz rolznz commented Dec 16, 2023

Fixes #155

  • change button state after payment completed
  • update react wrapper

README.md Outdated Show resolved Hide resolved
Copy link

socket-security bot commented Dec 20, 2023

New dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
@getalby/bitcoin-connect-react 3.1.0-beta.4 None +1 2.02 MB
@getalby/bitcoin-connect 3.1.0-beta.3 None +0 1.98 MB rolznz

README.md Outdated Show resolved Hide resolved
<span class="font-semibold">
${isLoading
? html`Loading...`
: html`${this._paid ? 'Paid' : this.title}`}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can children be a way to customize the text?

defaults like "Paid" will likely not work generally

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand. Could you explain? I just kept it simple for now, if this invoice is paid, show hardcoded text.

src/components/bc-pay-button.ts Show resolved Hide resolved
react/src/hooks/useOnPaid.ts Show resolved Hide resolved
@rolznz rolznz merged commit 94a4f42 into master Dec 20, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add "Pay Now" button
2 participants