medipass / react-payment-inputs

A React Hook & Container to help with payment card input fields.
https://medipass.github.io/react-payment-inputs
401 stars 63 forks source link

Card number - support setting the input type #65

Closed zshlomyz closed 3 years ago

zshlomyz commented 3 years ago

Hi, In order to support setting the input type, it only required to change the type prop of getCardNumberProps (ln 159):

type: props.type || 'tel',

and then it can be configured like this:

{...getCardNumberProps({ onChange: handleChangeCardNumber, type: "password" })}

Can you provide me a contributing permission please? Thanks

zshlomyz commented 3 years ago

I've opened a PR for that - https://github.com/medipass/react-payment-inputs/pull/66