forked from ambisign-gavin/react-native-swipe-item
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.d.ts
61 lines (59 loc) · 1.99 KB
/
index.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
52
53
54
55
56
57
58
59
60
61
declare module 'react-native-swipeable-item2' {
import { ViewStyle, ViewProps } from 'react-native';
import { Component, ReactChild, ReactNode } from 'react';
export class SwipeButtonsContainer extends Component<ViewProps, any> {
}
interface SwipeItemProps {
children?: ReactNode,
/**
* Swipe item layout style
*/
style?: ViewStyle,
/**
* Swipe item style
*/
swipeContainerStyle?: ViewStyle,
/**
* Buttons that want to show on the left when the item swiped to right.
*/
leftButtons?: ReactNode,
/**
* Buttons that want to show on the right when the item swiped to right.
*/
rightButtons?: ReactNode,
/**
* The component for the swipe item.
* More Information: https://github.com/ambisign-gavin/react-native-swipe-item#containerView
*/
containerView?: ReactNode,
/**
* will be triggered when the item started swipe from the origin position
* @param {SwipeItem} swipeItem SwipeItem reference
*/
onSwipeInitial?: (swipeItem: SwipeItem) => void,
/**
* will be triggered when left buttons showed
* @param {SwipeItem} swipeItem SwipeItem reference
*/
onLeftButtonsShowed?: (swipeItem: SwipeItem) => void,
/**
* will be triggered when right buttons showed
* @param {SwipeItem} swipeItem SwipeItem reference
*/
onRightButtonsShowed?: (swipeItem: SwipeItem) => void,
/**
* will be triggered when the item moved to the origin position
*/
onMovedToOrigin?: (swipeItem: SwipeItem) => void,
/**
* disable the swipe feature when there are no buttons.
*/
disableSwipeIfNoButton?: boolean,
}
export class SwipeItem extends Component<SwipeItemProps, {}> {
/**
* Close Swipe Item
*/
close(): void;
}
}