stripe-react-native
stripe-react-native copied to clipboard
CardField's cardStyle doesn't support 3 digit hex colours on Android
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:
- Create a
<CardField cardStyle={{backgroundColor: '#0f0', textColor: '#00f'}} ... /> - 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.
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?
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.