medipass / react-payment-inputs

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

Allow modifying placeholder text #15

Closed ronen-agranat closed 5 years ago

ronen-agranat commented 5 years ago

Currently, the error message text can easily be specified, for translations, for example.

However, the placeholder text is hardcoded.

If it were possible to override the placeholder text in the same way that is currently possible for the error message text, then that would make it much easier to provide localisation.

jxom commented 5 years ago

Sure. You can do that by passing the placeholder attribute to the <input> element:

<input {...getCardNumberProps()} placeholder="Card number" />