sbycrosz / react-native-credit-card-input

Easy, cross-platform credit-card input for your React Native Project! Start accepting payment 💰 in your app today!
MIT License
1.46k stars 699 forks source link

Change FullName #164

Closed RivieraData closed 2 months ago

RivieraData commented 4 years ago

Hello,

How can i change the name in my credit card ? This is my component :

`<CreditCardInput

        requiresName={true}
        onChange={this._onChange}
        labels={{
          number: "Numéro de carte",
          expiry: "Expiration",
          cvc: "CVC",
          name: "Titulaire de la carte"
        }}
        placeholders={{
          number: "1234 5678 1234 5678",
          expiry: "MM/YY",
          cvc: "123",
          name: ""
        }}
        cardScale={1}
        labelStyle={{ fontFamily: "Montserrat", fontSize: 12 }}
        inputStyle={{ fontFamily: "Montserrat", fontSize: 12 }}
        inputContainerStyle={{
          borderBottomWidth: 1,
          borderBottomColor: "rgba( 44, 104, 255,1)"
        }}
        additionalInputsProps={{
          name: {
            defaultValue: "TEST"
          }
        }}

      />`

Thank you

msaiducar64 commented 4 years ago

node_modules/react-native-car-input/src/CardView.js

static defaultProps = { name: "", placeholder: { number: "•••• •••• •••• ••••", name: "FULL NAME", ----------------> Changethis` expiry: "••/••", cvc: "•••", },

scale: 1,
fontFamily: Platform.select({ ios: "Courier", android: "monospace" }),
imageFront: require("../images/card-front.png"),
imageBack: require("../images/card-back.png"),

}; <Text style={[s.baseText, { fontFamily }, s.expiryLabel, s.placeholder, focused === "expiry" && s.focused]}> MONTH/YEAR ---------> Change this `

``