Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions packages/core/src/components/DeckSwiper/DeckSwiper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { StyleProp, ViewStyle, StyleSheet, View } from "react-native";
import DeckSwiperComponent from "react-native-deck-swiper";

export interface DeckSwiperProps<T> {
onStartSwipe?: () => void;
onEndSwipe?: () => void;
onSwipe?: (index: number) => void;
onSwipedLeft?: (index: number) => void;
onSwipedRight?: (index: number) => void;
Expand All @@ -22,6 +24,8 @@ export interface DeckSwiperProps<T> {
}

const DeckSwiper = <T extends object>({
onStartSwipe,
onEndSwipe,
onSwipe,
onSwipedLeft,
onSwipedRight,
Expand Down Expand Up @@ -150,6 +154,10 @@ const DeckSwiper = <T extends object>({
onSwipedDown?.(index);
onSwipe?.(index);
}}
//@ts-ignore Not typed, but is implemented and works
dragStart={onStartSwipe}
//@ts-ignore
dragEnd={onEndSwipe}
/>
</View>
);
Expand Down