airbridge-react-native-sdk
Version:
Airbridge SDK for React Native
30 lines (24 loc) • 600 B
JavaScript
import React, { Component } from 'react'
import { Colors } from '../common/Colors'
import {
Pressable,
Switch
} from 'react-native'
export default class CustomSwitch extends Component{
constructor(props){
super(props)
}
render() {
return (
<Pressable
accessibilityLabel={this.props.accessibilityLabel}
onPress={this.props.onPress}>
<Switch
disabled={this.props.disabled}
trackColor={{true: Colors.blue, false: Colors.grey}}
thumbColor={'#f4f3f4'}
value={this.props.value}/>
</Pressable>
)
}
}