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

PlatformPayButton has always height of 0 #1788

Open
codan84 opened this issue Dec 6, 2024 · 0 comments
Open

PlatformPayButton has always height of 0 #1788

codan84 opened this issue Dec 6, 2024 · 0 comments

Comments

@codan84
Copy link

codan84 commented Dec 6, 2024

Describe the bug
I am working with latest expo, did development build. All Stripe stuff is wired up correctly as I can complete test payments.
For some reason when I add a PlatformPayButton to my app it doesn't show. Upon further testing it turns out that the height of the button is 0 and has to be set via style for the button to show up.
Not working, without height set (see screenshot 1):

<ThemedText>----foo----</ThemedText>
        <PlatformPayButton
          disabled={false}
          type={PlatformPay.ButtonType.Pay}
          appearance={PlatformPay.ButtonStyle.Black}
          borderRadius={4}
          onPress={submitOrder}
        />
 <ThemedText>----bar----</ThemedText>

Not working, without height set, with borders to illustrate (see screenshot 2):

<ThemedText>----foo----</ThemedText>
        <PlatformPayButton
          disabled={false}
          type={PlatformPay.ButtonType.Pay}
          appearance={PlatformPay.ButtonStyle.Black}
          borderRadius={4}
          style={{ borderWidth: 3, borderColor: 'red' }}
          onPress={submitOrder}
        />
<ThemedText>----bar----</ThemedText>

Working, with height set (see screenshot 3):

<ThemedText>----foo----</ThemedText>
        <PlatformPayButton
          disabled={false}
          type={PlatformPay.ButtonType.Pay}
          appearance={PlatformPay.ButtonStyle.Black}
          borderRadius={4}
          style={{ height: 40 }}
          onPress={submitOrder}
        />
<ThemedText>----bar----</ThemedText>

Expected behaviour
I'd expect either of the 2:

  • PlatformPayButton has some default non-0 height set
  • This is clearly explained in docs as for people to not waste time finding out why their PlatformPayButton is not showing up.

Screenshots
If applicable, add screenshots to help explain your problem.

Screenshot 1:
IMG_2508

Screenshot 2:
IMG_2509

Screenshot 3:
IMG_2510

Smartphone (please complete the following information):

  • Device: iPhone 12
  • OS: iOS 18.11
  • EXPO SDK52 development build
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

No branches or pull requests

1 participant