0.3.6 • Published 3 years ago

react-native-credit-card-display v0.3.6

Weekly downloads
62
License
MIT
Repository
github
Last release
3 years ago

react-native-credit-card-display

Credit Card Component for React Native -- Display Only. At the moment, it only supports Android and iOS, since react-native-flip-card only supports those two platforms.

Installation

npm install react-native-credit-card-display

or

yarn add react-native-credit-card-display

Usage

import CreditCardDisplay from 'react-native-credit-card-display';

// ...

return (
  <CreditCardDisplay
    number={4242424242424242}
    cvc={123}
    expiration="04/21"
    name="John J. Doe"
    since="2004"
  />
);

Props

PropDescriptionDefault ValueRequiredNotes
numberNumber to display on the front of the cardundefinedYescan be a number or a string.
nameName to display on the front of the cardundefinedYes
expirationExpiration Date to display on the front of the cardundefinedYesif passed a number (e.g. 0621), it will be formatted, otherwise displayed as given.
cvcCVC to display on the back of the cardundefinedYescan be a number or a string.
sinceYear for Customer Sinceundefinednocan be a number or a string.
flippedIs the card flipped?falsenoUse this to programmatically toggle the card.
frictionFriction for the card flip6noI couldn't figure out what this does, but I'm just passing it to react-native-flip-card if anyone wants it.
fontSizeBase font size to use20nowill scale all displayed text
fontColorColor to use for the numbers and letters#FFFFFFno
heightHeight for card190no
widthWidth for card300no
cardStylesAdditional styles to apply to the component from react-native-flip-card{}no
frontStylesAdditional styles to apply to the front of the card{}no
backStylesAdditional styles to apply to the back of the card{}no
frontImageAlternate image to use for the front of the cardpurple card imageno
backImageAlternate image to use for the back of the cardpurple card imageno
borderRadiusBorder Radius to use on the images20no

Note: flipped only toggles the flip, not sets it absolutely (this is a limitation of the library used, react-native-flip-card).

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

0.3.6

3 years ago

0.3.5

3 years ago

0.3.2

4 years ago

0.3.4

4 years ago

0.3.3

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.0

4 years ago

0.1.1

4 years ago

0.0.0

4 years ago