Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CardField Dark Mode Broken for Android & iOS #1778

Open
skoolaidl opened this issue Nov 20, 2024 · 0 comments
Open

CardField Dark Mode Broken for Android & iOS #1778

skoolaidl opened this issue Nov 20, 2024 · 0 comments

Comments

@skoolaidl
Copy link

skoolaidl commented Nov 20, 2024

Describe the bug
The CardField for the React Native SDK does not work with dark mode. I have not implemented dark mode into my app, it's in the plans but for now I am just trying to get it up and running. FYI if you try to change the TextColor in cardStyles, it does not work for every scenario. This is not a valid solution.

The behavior is slightly different depending on the OS and setting (see screenshots for each scenario):

Android Dark Mode: You cannot see the icon, placeholder text, or the text you type
Android Light Mode: You can see the icon, placeholder text, and the text you type
iOS Dark Mode: You cannot see the icon or the text you type, you can see the placeholder text
iOS light Mode You can see the icon, placeholder text, and the text you type

To Reproduce
Steps to reproduce the behavior:

  1. Add CardField component to any app like so:
<CardField
    postalCodeEnabled={true}
    placeholders={{
        number: '4242 4242 4242 4242',
    }}
    cardStyle={{
        borderColor: '#ffffff',
        borderWidth: 1,
    }}
    style={{
        width: '90%',
        height: 50,
        marginVertical: 30,
    }}
/>

Expected behavior
You should be able to see the text if dark mode is enabled. Dark mode is broken and light mode works.

Additionally, you should be able to disable the component from automatically changing the colors regardless of if the phone is in dark mode or light mode. Not having that simple level of control is very difficult.

Screenshots
Result is this in Android with dark mode enabled:
Screenshot 2024-11-20 at 12 24 01 PM

Android Light Mode:
Screenshot 2024-11-20 at 12 26 25 PM

iOS Dark Mode
With no input
Screenshot 2024-11-20 at 12 31 53 PM
With input
Screenshot 2024-11-20 at 12 36 29 PM

iOS Light Mode:
Screenshot 2024-11-20 at 12 36 05 PM

Smartphone (please complete the following information):

  • Device: All devices
  • OS: All OS
  • Browser [e.g. stock browser, safari]
  • Version React Native SDK 0.39.0, RN version 0.75.4

Additional context
None.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant