Switch component background color issue when value is false
Description
Expected behavior:
When the Switch component value is false, the background color should remain white.
Actual behavior:
When the Switch component value is false, the background color appears to be grey instead of white.
Additional information:
Expected
Actual
React Native Version
0.70.6
Output of npx react-native info
n/a
Steps to reproduce
- Create a new React Native project.
- Add a Switch component to a screen or component.
- Set the background color of the Switch component to white.
- Test the Switch component by toggling its value between true and false.
Snack, code example, screenshot, or link to a repository
<Switch trackColor={{false: '#ffffff', true: '#ffffff'}} thumbColor={isEnabled ? '#EAC041' : '#C7C7C7'} ios_backgroundColor="#ffffff" onValueChange={toggleSwitch} value={isEnabled} style={{backgroundColor: 'white'}}/>
| :warning: | Newer Version of React Native is Available! |
|---|---|
| :information_source: | You are on a supported minor version, but it looks like there's a newer patch available - 0.70.10. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases. |
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been stalled for 7 days with no activity.