1.0.61 • Published 4 years ago

react-native-payment-card v1.0.61

Weekly downloads
5
License
ISC
Repository
github
Last release
4 years ago

A payment card display component and card validator for react native applications.

npm.io

Installation

npm install --save react-native-payment-card

Usage

<CreditCardInput
autoFocus
requiresName
requiresCVC
labelStyle={}
inputStyle={}
validColor={"black"}
invalidColor={"red"}
placeholderColor={"darkgray"}
onChange={this._onChange}
/>

//Note: The data entered in the card component is availaible in the onChange Method.

Props

PropsTypeDescription
autoFocusPropTypes.boolAutomatically sets focus on input field
onChangePropTypes.funcReturns a object with keys name,email,cvv,card number and its value that can be used.
placeholderColorPropTypes.stringCan be used to set color of input fields
validColorPropTypes.stringCan be used to indicate colour of valid fields
invalidColorPropTypes.stringCan be used to indicate colour of invalid fields
labelStylePropTypes.stringCan be used to style input labels
inputStylePropTypes.stringCan be used to style input fields
requiresNamePropTypes.boolBoolean to display name field
requiresCVCPropTypes.boolBoolean to display CVC field
requiresEmailPropTypes.boolBoolean to display emailfield
requiresPostalCodePropTypes.boolBoolean to display postal code field