react-native-switch-toggle
Version:
Highly customizable animating react native switch toggle component.
59 lines (56 loc) • 1.51 kB
Flow
/**
* Flowtype definitions for index
* Generated by Flowgen from a Typescript Definition
* Flowgen v1.14.1
*/
import { StyleProp, TextStyle, ViewStyle } from "react-native";
import React from "react";
declare interface Props {
testID?: string;
switchOn: boolean;
onPress: () => void;
containerStyle?: ViewStyle;
circleStyle?: ViewStyle;
backgroundColorOn?: string;
backgroundColorOff?: string;
backgroundImageOn?: React.ReactElement;
backgroundImageOff?: React.ReactElement;
circleColorOff?: string;
circleColorOn?: string;
duration?: number;
type?: number;
buttonText?: string;
backTextRight?: string;
backTextLeft?: string;
buttonTextStyle?: StyleProp<TextStyle>;
textRightStyle?: StyleProp<TextStyle>;
textLeftStyle?: StyleProp<TextStyle>;
buttonStyle?: StyleProp<ViewStyle>;
buttonContainerStyle?: StyleProp<ViewStyle>;
rightContainerStyle?: StyleProp<ViewStyle>;
leftContainerStyle?: StyleProp<ViewStyle>;
RTL?: boolean;
}
declare var SwitchToggle: typeof npm$namespace$SwitchToggle;
declare var npm$namespace$SwitchToggle: {|
(props: Props): React.ReactElement,
defaultProps: typeof SwitchToggle$defaultProps,
|};
declare var SwitchToggle$defaultProps: {
containerStyle: {
marginTop: number,
width: number,
height: number,
borderRadius: number,
padding: number,
...
},
circleStyle: {
width: number,
height: number,
borderRadius: number,
...
},
...
};
declare export default typeof SwitchToggle;