Zein
Zein

Reputation: 577

Stripe Custom Layout React Native

I'm trying to integrate stripe on my mobile app I tried to import CardField from '@stripe/stripe-react-native' but the problem is I can't change its style I want the number field to be on the line as so for both CVC and expiry date. is there a way to do this I checked the documentation I only found this example

Upvotes: 1

Views: 2683

Answers (1)

Nolan H
Nolan H

Reputation: 7419

The docs for using the CardField with stripe-react-native are here: https://stripe.com/docs/payments/accept-a-payment?platform=react-native&ui=custom#react-native-create-checkout-page

The CardField support some styling via style and cardStyle as shown in the example:

<CardField
    cardStyle={{
      backgroundColor: '#FFFFFF',
      textColor: '#000000',
    }}
    style={{
      width: '100%',
      height: 50,
      marginVertical: 30,
    }}
  />

Upvotes: 1

Related Questions