forked from mochixuan/react-native-drag-sort
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.d.ts
More file actions
34 lines (28 loc) · 991 Bytes
/
index.d.ts
File metadata and controls
34 lines (28 loc) · 991 Bytes
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
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) => void;
maxScale?: number;
minOpacity?: number;
scaleDuration?: number;
slideDuration?: number;
}
export default class DragSortableView extends Component<IProps>{}