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 trackColor not working #101

Closed
aloptrbl opened this issue Jul 10, 2019 · 2 comments
Closed

Switch trackColor not working #101

aloptrbl opened this issue Jul 10, 2019 · 2 comments
Labels
Status: Available Type: Bug Something isn't working

Comments

@aloptrbl
Copy link

Switch trackColor true value and default string value not working changing color but false value working when changing to this:

 <Switch 
 initialValue={false}
 trackColor={{true: 'white', false: 'green'}}
 thumbColor={'black'}
 onChange={() => Alert.alert('switch')} />
@shubhamkakkar
Copy link
Contributor

shubhamkakkar commented Jul 15, 2019

You are unable to change the true color value because
its value could be only one of these
'primary', 'theme', 'error', 'warning', 'success', 'info'

Where as there is no such limitation with the false color value

I know this doesnot give the user much flexibility here, other than setting the theme color, but I myself am not a big theme fan
I am raising a PR, hope it enters the room

@palingheorghe
Copy link
Collaborator

fixed it and merged into dev branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Available Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants