forked from mochixuan/react-native-drag-sort
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
46 lines (38 loc) · 1.3 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
import React, { Component } from 'react'
interface IProps{
dataSource: any[];
parentWidth: number;
childrenHeight: number;
childrenWidth: number;
marginChildrenTop?: number;
marginChildrenBottom?: number;
marginChildrenLeft?: number;
marginChildrenRight?: number;
sortable?: boolean;
onClickItem?: (data: any[],item: any,index: number) => void;
onDragStart?: (fromIndex: number) => void;
onDragEnd?: (fromIndex: number,toIndex: number) => void;
onDataChange?: (data: any[]) => void;
renderItem: (item: any,index: number) => React.ReactElement<any>;
scaleStatus?: 'scale' | 'scaleX' |'scaleY';
fixedItems?: number[];
keyExtractor?: (item: any,index: number) => any;
delayLongPress?: number;
isDragFreely?: boolean;
onDragging?: (gestureState: any, left: number, top: number, moveToIndex: number) => void;
maxScale?: number;
minOpacity?: number;
scaleDuration?: number;
slideDuration?: number;
}
interface AutoIProps extends IProps {
autoThrottle?: number,
autoThrottleDuration?: number,
renderHeaderView?: any,
headerViewHeight?: number,
renderBottomView?: any,
bottomViewHeight?: number,
}
declare class DragSortableView extends Component<IProps>{}
declare class AutoDragSortableView extends Component<AutoIProps> {}
export { DragSortableView, AutoDragSortableView }