[change] Switch prop 'trackColor' support

Remove support for legacy React Native props and add support for the
'trackColor' object. Retains support for the web-only equivalents as I think
this API is preferable to the one in React Native, both in terms of flexibility
and performance (no inline objects).

Fix #1382
This commit is contained in:
Nicolas Gallagher
2019-12-18 16:13:35 +00:00
parent 3c9cc66264
commit aa8593ba97
2 changed files with 19 additions and 39 deletions
@@ -26,7 +26,7 @@ The color of the thumb grip when the switch is turned on. (Web-only)
### activeTrackColor
The color of the track when the switch is turned on. (Web-only, equivalent to React Native's `onTintColor`)
The color of the track when the switch is turned on. (Web-only)
<Preview withSource='none'>
<Story name="activeTrackColor">
@@ -56,7 +56,7 @@ Invoked with the new value when the value changes.
### thumbColor
The color of the thumb grip when the switch is turned off. (Web-only, equivalent to React Native's `thumbTintColor`)
The color of the thumb grip when the switch is turned off.
<Preview withSource='none'>
<Story name="thumbColor">
@@ -66,7 +66,7 @@ The color of the thumb grip when the switch is turned off. (Web-only, equivalent
### trackColor
The color of the track when the switch is turned off. (Web-only, equivalent to React Native's `tintColor`)
The color of the track when the switch is turned off.
<Preview withSource='none'>
<Story name="trackColor">