react-native-swipe-cards-stack
Version:
A highly customizable, performant swipeable cards stack component for React Native.
37 lines (36 loc) • 1.28 kB
TypeScript
import React from 'react';
import { Animated } from 'react-native';
import { SwipeableCardData, SwipeIcons, SwipeThresholds, SwipeAnimations, SwipeGestures, SwipeCallbacks } from '../types';
export interface SwipeableCardProps {
card: SwipeableCardData;
index: number;
isTop: boolean;
isActive: boolean;
onSwipe: (direction: 'left' | 'right' | 'up' | 'down', card: SwipeableCardData, index: number) => void;
onTap?: (item: SwipeableCardData, index: number) => void;
tapActiveOpacity?: number;
animatedValue: Animated.ValueXY;
cardStyle?: any;
swipeIcons?: SwipeIcons;
thresholds?: SwipeThresholds;
animations?: SwipeAnimations;
gestures?: SwipeGestures;
callbacks?: SwipeCallbacks;
cardDimensions?: {
width?: number | string;
height?: number | string;
};
children: React.ReactNode;
directIcons?: {
leftSwipeIcon?: React.ReactNode;
rightSwipeIcon?: React.ReactNode;
upSwipeIcon?: React.ReactNode;
downSwipeIcon?: React.ReactNode;
leftSwipeIconStyle?: any;
rightSwipeIconStyle?: any;
upSwipeIconStyle?: any;
downSwipeIconStyle?: any;
};
}
declare const SwipeableCard: React.FC<SwipeableCardProps>;
export default SwipeableCard;