Switch React Native
Content
Installation
npm install switch-react-native
Usage example
;;; { return <View> <Switch height=40 width=300 activeText=`Active Text` inActiveText=`InActive Text` onValueChange= console /> </View> ; }
Properties
width
(Number) - Initial switch state (default: 150),height
(Number) - Initial switch state (default: 50),time
(Number) - Initial switch state (default: 200 mms),value
(Bool) - Initial switch state (default: false),activeText
(String) - String activeText,inActiveText
(String) - String inActiveText,activeTextStyle
(Object) - Style is object,inActiveTextStyle
(Object) - Style is object,activeStyle
(Object) - Style is object,backgroundStyle
(Object) - Style is object,
Events
onValueChange
: This function is called when the switch is activated.
License
MIT License
Questions?
Feel free to create an issue