Skip to content

Commit

Permalink
rename type
Browse files Browse the repository at this point in the history
  • Loading branch information
kosmydel committed Sep 4, 2023
1 parent 269e679 commit 3e95fd3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/DraggableList/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@ type RefType<T> = Pick<FlatList<T>, 'scrollToEnd'>;

type DraggableListType = <T>(props: DraggableListProps<T> & {ref?: React.ForwardedRef<RefType<T>>}) => JSX.Element;

type DataType<T> = {
type DraggableListData<T> = {
data: T[];
};

type DraggableListProps<T> = {
keyExtractor: (item: T, index: number) => string;
renderItem: (params: RenderItemParams<T>) => React.ReactNode;
onDragEnd?: (params: DataType<T>) => void;
onDragEnd?: (params: DraggableListData<T>) => void;
onDragBegin?: () => void;
onPlaceholderIndexChange?: (placeholderIndex: number) => void;
renderClone?: DraggableChildrenFn;
shouldUsePortal?: boolean;
onContentSizeChange?: ((w: number, h: number) => void) | undefined;
// TODO: implement on web
onScrollOffsetChange?: (() => void) | undefined;
} & DataType<T>;
} & DraggableListData<T>;

type RenderItemParams<T> = OriginalRenderItemParams<T>;

Expand Down

0 comments on commit 3e95fd3

Please sign in to comment.