-
Notifications
You must be signed in to change notification settings - Fork 75
/
types.d.ts
51 lines (47 loc) · 1.55 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
48
49
50
51
import { Component, ReactElement } from 'react';
import { StyleProp, ViewStyle, TextStyle } from 'react-native';
interface Props {
containerStyles?: 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>;
resetAfterSuccessAnimDelay: PropTypes.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>;
thumbIconHeight?: number;
thumbIconWidth?: number;
title?: string;
titleColor?: string;
titleFontSize?: number;
titleMaxFontScale?: number;
titleMaxLines: 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
};