Commit 40a59f7d authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Merge branch 'fix/remove-deprecated-switch-properties' into 'master'

Replace deprecated onTintColor and thumbTintColor properties in Switch

See merge request !233
parents 4ce9022f ee25ac2a
...@@ -157,8 +157,11 @@ class EventAdminScreen extends Component { ...@@ -157,8 +157,11 @@ class EventAdminScreen extends Component {
<Switch <Switch
value={present} value={present}
onValueChange={value => this.updateValue(item, value, payment)} onValueChange={value => this.updateValue(item, value, payment)}
onTintColor={Colors.magenta} trackColor={{
thumbTintColor={present ? Colors.darkMagenta : Colors.grey} false: Colors.lightGray,
true: Colors.magenta,
}}
thumbColor={present ? Colors.darkMagenta : Colors.grey}
/> />
</View> </View>
<View style={styles.paymentContainer}> <View style={styles.paymentContainer}>
......
...@@ -136,8 +136,11 @@ class RegistrationScreen extends Component { ...@@ -136,8 +136,11 @@ class RegistrationScreen extends Component {
<Switch <Switch
value={this.state[key]} value={this.state[key]}
onValueChange={value => this.updateField(key, value)} onValueChange={value => this.updateField(key, value)}
thumbTintColor={this.state[key] ? Colors.darkMagenta : Colors.lightGray} thumbColor={this.state[key] ? Colors.darkMagenta : Colors.lightGray}
onTintColor={Colors.magenta} trackColor={{
false: Colors.lightGray,
true: Colors.magenta,
}}
/> />
</View> </View>
<HTML <HTML
......
...@@ -73,8 +73,11 @@ class NotificationsSection extends Component { ...@@ -73,8 +73,11 @@ class NotificationsSection extends Component {
<Switch <Switch
value={this.state[category.key]} value={this.state[category.key]}
onValueChange={value => this.updateField(category.key, value)} onValueChange={value => this.updateField(category.key, value)}
onTintColor={Colors.magenta} trackColor={{
thumbTintColor={this.state[category.key] false: Colors.lightGray,
true: Colors.magenta,
}}
thumbColor={this.state[category.key]
? Colors.darkMagenta : Colors.grey} ? Colors.darkMagenta : Colors.grey}
disabled={category.key === GENERAL_KEY} disabled={category.key === GENERAL_KEY}
style={styles.settingsSwitch} style={styles.settingsSwitch}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment