#hexiaolong

1 messages · Page 1 of 1 (latest)

wanton edgeBOT
rugged fulcrum
#

I am afraid this is not customizable. Is that screenshot something you drew as a concept?

sacred burrow
rugged fulcrum
#

Yes I see it. Do you have a public URL I can see?

sacred burrow
sacred burrow
rugged fulcrum
#

Hey I don't see the same thing. Can you capture screen?

rugged fulcrum
#

Ah I see that, thanks!

sacred burrow
rugged fulcrum
#

layout = 'accordion'

sacred burrow
sacred burrow
sacred burrow
sacred burrow
timid vapor
#

Hi! I'm taking over this thread.

#

Give me a few minutes to look into this.

sacred burrow
timid vapor
#

Can you try something like this: <PaymentElement options={{ layout: "accordion" }} />

sacred burrow
#

"stripe": "^8.202.0" "@stripe/react-stripe-js": "^1.0.0", "@stripe/stripe-js": "^1.0.0", the project has these packages ,

timid vapor
#

Which version of stripe-react are you using? layout was released recently, so make sure you are using the latest version v1.16.0

sacred burrow
timid vapor
#

yes

sacred burrow
sacred burrow
# timid vapor yes

my question is, with the direct export of Paymentelements and Elements currently used, like this,import { Elements } from '@stripe/react-stripe-js' ;import { PaymentElement, useStripe, useElements } from '@stripe/react-stripe-js' ;can I create my own, and how? thanks

timid vapor
#

The screenshot you shared shows how to create a Payment Element in plain Javascript (no React). If you are using React you should use <PaymentElement options={{ layout: "accordion" }} />

#

Otherwise it's something like elements.create('payment', { options: { layout: 'accordion'} })

sacred burrow
timid vapor
#

This is regular JavaScript, so it's using Stripe.js (and not stripe-react-js)

#

Why aren't you doing <PaymentElement options={{ layout: "accordion" }} /> since you are using React?

sacred burrow
timid vapor
#

Yes:

  • Upgrade your stripe-react-js version
  • Then use <PaymentElement options={{ layout: "accordion" }} />
    And it should work!
sacred burrow