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

feature: Add highlight styling to list style #1919

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

jjvarghese
Copy link

Summary

Added the ability to customize highlighted (tapped state) background color of List Items. Previously, it was locked to the default OS value.

What problem you’re solving

Unable to change the highlighted background color of list items.

Your approach to fixing the problem

Added a style property to ListItemStyle - as an optional value, because the default value is OS protected and can only be approximated. This also means it won't result in any changes to existing implementations.

Any tests you wrote

As a highlighted state that only occurs on tapping, I did not see a way to integrate with snapshot tests. Happy to add some if someone can point me in the right direction.

@goergisn
Copy link
Contributor

Hi @jjvarghese,
Thank you for your contribution :)

Do you mind explaining what your intended usecase is?
If you want to have a dark highlight you might want to try applying this suggestion.

@jjvarghese
Copy link
Author

Hi @jjvarghese, Thank you for your contribution :)

Do you mind explaining what your intended usecase is? If you want to have a dark highlight you might want to try applying this suggestion.

Hi @goergisn, thanks for the suggestion. My use case is applying a specific theme from a designer to our Adyen Drop In component, including a specific colour value for the list item highlighted state. While the automatic colours in dark mode would indeed look better than the light ones for my use case, being able to specify the exact colour to use is what I am currently after.

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

Successfully merging this pull request may close these issues.

2 participants