forked from tap349/RNSwipeButton
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.d.ts
47 lines (43 loc) · 1.42 KB
/
types.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import { Component, ReactElement } from 'react';
import { StyleProp, ViewStyle, TextStyle } from 'react-native';
interface Props {
containerStyle?: StyleProp<ViewStyle>;
disabled?: boolean;
disabledRailBackgroundColor?: string;
disabledThumbIconBackgroundColor?: string;
disabledThumbIconBorderColor?: string;
enableRightToLeftSwipe?: boolean;
height?: number | string;
onSwipeFail?: () => void;
onSwipeStart?: () => void;
onSwipeSuccess?: () => void;
railBackgroundColor?: string;
railBorderColor?: string;
railFillBackgroundColor?: string;
railFillBorderColor?: string;
railStyles?: StyleProp<ViewStyle>;
resetAfterSuccessAnimDuration?: number;
screenReaderEnabled?: boolean;
shouldResetAfterSuccess?: boolean;
swipeSuccessThreshold?: number; // Ex: 70. Swipping 70% will be considered as successful swipe
thumbIconBackgroundColor?: string;
thumbIconBorderColor?: string;
thumbIconComponent?: ReactElement;
thumbIconImageSource?: string | number;
thumbIconStyles?: StyleProp<ViewStyle>;
title?: string;
titleColor?: string;
titleFontSize?: number;
titleStyles?: StyleProp<TextStyle>;
width?: string | number;
}
interface State {
layoutWidth: number;
screenReaderEnabled: boolean;
}
export default class RNSwipeButton extends Component<Props, State> {
static defaultProps = RNSwipeButton.defaultProps;
}
export {
Props
};