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

CardForm (hide country/postal code + choose error label position) #1047

Open
nicolasdevienne opened this issue Jul 18, 2022 · 4 comments
Open
Labels
reproduce Try and reproduce the issue

Comments

@nicolasdevienne
Copy link

nicolasdevienne commented Jul 18, 2022

On the CardForm, I would like :

  • to hide country/postal code
  • to choose error label position (flex-start, ...)

Is it possible to add these options ?

Simulator Screen Shot - iPhone 13 mini - 2022-07-18 at 12 21 10

@nicolasdevienne nicolasdevienne changed the title CardForm error label position CardForm (hide country/postal code + choose error label position) Jul 19, 2022
@charliecruzan-stripe
Copy link
Collaborator

Unfortunately this isn't possible- I would recommend utilizing either the CardField component or PaymentSheet.

Providing the default country (which includes providing a country where the postal code isn't shown if that country doesn't have postal codes) will be added in #1044

that being said- the error message seems to be placed fairly far away from the component in your screenshot 🤔 what version are you using and what does your code look like? I can't repro that

@charliecruzan-stripe charliecruzan-stripe added the reproduce Try and reproduce the issue label Jul 20, 2022
@nicolasdevienne
Copy link
Author

Hi @charliecruzan-stripe, I think it's due to the height of the CardForm (I use last version 0.15.0) :

          <CardForm
            cardStyle={{
              backgroundColor: COLORS.COLOR1,
              borderRadius: DIMENSIONS.SIZE010,
              cursorColor: COLORS.GRAY_DARK,
              placeholderColor: COLORS.GRAY_DARK,
              textErrorColor: COLORS.RED_DARK,
            }}
            style={{
              height: DEVICE_WIDTH,
              marginHorizontal: 20,
            }}
            onFormComplete={card => setCard(card.complete && card)}

But as you can see, on Android it's OK :

Screenshot_1658337751

@nicolasdevienne
Copy link
Author

Hi @charliecruzan-stripe ! No PR for this ? :)

@AristideVB
Copy link

Any updates ? 🙏 would love to hide country field

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
reproduce Try and reproduce the issue
Projects
None yet
Development

No branches or pull requests

3 participants