UNPKG

@uiw/react-native

Version:
46 lines (45 loc) 1.78 kB
import React from 'react'; import { Animated, StyleProp, ViewStyle } from 'react-native'; export interface Column { /** 显示文字 */ text: string; /** 背景色 */ color: string; /** 滑动距离多少出现 */ x?: number; /** 点击元素触发 */ onPress?: () => void; /** 自定义元素 */ render?: (text: string, record: Column, index: number) => React.ReactNode; } export interface SwipeActionProps { /** 右边滑动出来的元素 */ right?: Array<Column>; /** 左边滑动出来的元素 */ left?: Array<Column>; swipeWidth?: string | number; enableTrackpadTwoFingerGesture?: boolean; friction?: number; leftThreshold?: number; rightThreshold?: number; overshootLeft?: boolean; overshootRight?: boolean; overshootFriction?: number; onSwipeableLeftOpen?: () => void; onSwipeableRightOpen?: () => void; onSwipeableOpen?: () => void; onSwipeableClose?: () => void; onSwipeableLeftWillOpen?: () => void; onSwipeableRightWillOpen?: () => void; onSwipeableWillOpen?: () => void; onSwipeableWillClose?: () => void; children?: React.ReactNode; renderLeftActions?: (progressAnimatedValue: Animated.AnimatedInterpolation, dragAnimatedValue: Animated.AnimatedInterpolation) => React.ReactNode; renderRightActions?: (progressAnimatedValue: Animated.AnimatedInterpolation, dragAnimatedValue: Animated.AnimatedInterpolation) => React.ReactNode; useNativeAnimations?: boolean; animationOptions?: Record<string, unknown>; containerStyle?: StyleProp<ViewStyle>; childrenContainerStyle?: StyleProp<ViewStyle>; } declare const _default: React.ForwardRefExoticComponent<SwipeActionProps & React.RefAttributes<unknown>>; export default _default;