Description:
An animated and highly customizable on/off switch button component for React Native.
How to use it:
1. Install and import the switch-button.
# NPM $ npm i @freakycoder/react-native-switch-button --save import SwitchButton from "@freakycoder/react-native-switch-button";
2. Add the switch-button component to the app and specify the path to inactive/active images as follows:
<SwitchButton
text="ReactScript"
inactiveImageSource={require("inactive.png")}
activeImageSource={require("active.png")}
onPress={(isActive: boolean) => console.log(isActive)}
/>3. All default component props.
style?: CustomStyleProp; textStyle?: CustomTextStyleProp; imageStyle?: CustomImageStyleProp; textContainerStyle?: CustomTextStyleProp; activeImageSource: ImageSourcePropType; inactiveImageSource: ImageSourcePropType; text?: string; mainColor?: string; tintColor?: string; disableText?: boolean; originalColor?: string; onPress: (isActive: boolean) => void;






