react-native-credit-card-input
react-native-credit-card-input copied to clipboard
Change FullName
trafficstars
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
node_modules/react-native-car-input/src/CardView.js
static defaultProps = { name: "", placeholder: { number: "•••• •••• •••• ••••", name: "FULL NAME", ----------------> Change this`
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
</Text>`
``