stripe-react-native icon indicating copy to clipboard operation
stripe-react-native copied to clipboard

CardField's cardStyle doesn't support 3 digit hex colours on Android

Open bvinnerd opened this issue 2 years ago • 2 comments
trafficstars

Describe the bug When setting the cardField prop on <CardField />, using 3 digit hex codes causes the Android emulator to error with message: "Error while updating property 'cardStyle' of a view managed by: CardField"

To Reproduce Steps to reproduce the behavior:

  1. Create a <CardField cardStyle={{backgroundColor: '#0f0', textColor: '#00f'}} ... />
  2. See error

Expected behavior The CardField should be shown without error.

Screenshots n/a

Desktop (please complete the following information):

  • OS: macOS
  • Version: 13.4

Additional context Try using a 6 digit hex colour code, e.g. #ffffff and it does not error.

bvinnerd avatar Jun 02 '23 11:06 bvinnerd

Hi! We likely will add an error check for this like we have in the Payment Sheet, but it still won't be supported. Is there a reason you'd prefer 3 digit hex codes?

charliecruzan-stripe avatar Jun 08 '23 23:06 charliecruzan-stripe

Hi! We likely will add an error check for this like we have in the Payment Sheet, but it still won't be supported. Is there a reason you'd prefer 3 digit hex codes?

It's not important to me. I just thought I'd report it. My app has a mix of 3 and 6 digits colour codes, and it took me a little while to discover this was the issue.

bvinnerd avatar Jun 08 '23 23:06 bvinnerd