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

Switch disabled track and thumb color #1758

Closed
reck753 opened this issue Sep 29, 2020 · 2 comments
Closed

Switch disabled track and thumb color #1758

reck753 opened this issue Sep 29, 2020 · 2 comments
Milestone

Comments

@reck753
Copy link

reck753 commented Sep 29, 2020

Is your feature request related to a problem? Please describe.
No.

Describe a solution you'd like
I saw that the disabled colors are hard-coded so I would only change them with variables passed from props. Eg. I would add two more props disabledTrackColor and disabledThumbColor. I feel like that styling should be adjustable, because not everyone is happy with those colors.

Describe alternatives you've considered

Additional context
Eg. I have a switch with red track and white thumb and I would like it to have some light red color for track and some light grey color for thumb when disabled, instead of those that are hard-coded.

Repository owner deleted a comment from MoeKanan Jul 6, 2021
Repository owner deleted a comment from bouaoud Jul 6, 2021
@makkarMeenu
Copy link
Contributor

@reck753 This PR resolves the above issue in a different way.
You can change trackColor and thumbColor conditionally according to disabled condition.
I think, we can't introduce new props as react-native also doesn't provide disabledTrackColor and disabledThumbColor.

@reck753
Copy link
Author

reck753 commented Nov 9, 2021

@reck753 This PR resolves the above issue in a different way. You can change trackColor and thumbColor conditionally according to disabled condition. I think, we can't introduce new props as react-native also doesn't provide disabledTrackColor and disabledThumbColor.

Hi, @makkarMeenu!
Thanks for the PR! This would be a good enough solution for me.

@necolas necolas added this to the 0.17.x milestone Feb 7, 2022
rnike pushed a commit to VeryBuy/react-native-web that referenced this issue Sep 13, 2022
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 a pull request may close this issue.

3 participants