Skip to content

Commit

Permalink
refactor: export custom RenderItemParams
Browse files Browse the repository at this point in the history
  • Loading branch information
kosmydel committed Aug 24, 2023
1 parent 30b1156 commit 5693882
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { useState } from 'react';

import { SafeAreaView, TouchableOpacity, Text, View } from 'react-native';
import { DraggableList, ScaleDecorator } from 'react-native-x-draggable-list';
import type { RenderItemParams } from 'react-native-draggable-flatlist';
import { GestureHandlerRootView } from 'react-native-gesture-handler';
import { COLORS, getBackgroundColor, getCurrentTime, styles } from './utils';
import type { RenderItemParams } from 'src/DraggableList/types';

/**
* Type of the item in the list
Expand Down
5 changes: 4 additions & 1 deletion src/DraggableList/types.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { RenderItemParams } from 'react-native-draggable-flatlist';
import type { RenderItemParams as OriginalRenderItemParams } from 'react-native-draggable-flatlist';

export type DefaultItemProps = {
id: string;
Expand All @@ -11,3 +11,6 @@ export type DraggableListProps<T extends DefaultItemProps> = {
onDragBegin?: () => void;
onPlaceholderIndexChange?: ((placeholderIndex: number) => void) | undefined;
};

export type RenderItemParams<T extends DefaultItemProps> =
OriginalRenderItemParams<T>;

0 comments on commit 5693882

Please sign in to comment.