UNPKG

react-native-ui-lib

Version:

[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner-direct.svg)](https://stand-with-ukraine.pp.ua)

95 lines (94 loc) 3.36 kB
import React, { Component } from 'react'; import { Animated } from 'react-native'; import { State } from 'react-native-gesture-handler'; type Props = { children: any; friction: number; leftThreshold?: number; rightThreshold?: number; fullLeftThreshold?: number; fullSwipeLeft?: boolean; fullRightThreshold?: number; fullSwipeRight?: boolean; overshootLeft?: boolean; overshootRight?: boolean; overshootFriction?: number; onSwipeableLeftOpen?: Function; onSwipeableRightOpen?: Function; onSwipeableOpen?: Function; onSwipeableClose?: Function; onSwipeableLeftWillOpen?: Function; onSwipeableRightWillOpen?: Function; onSwipeableWillOpen?: Function; onSwipeableWillClose?: Function; onFullSwipeLeft?: Function; onToggleSwipeLeft?: Function; onWillFullSwipeLeft?: Function; onFullSwipeRight?: Function; onWillFullSwipeRight?: Function; onDragStart?: Function; renderLeftActions?: (progressAnimatedValue: any, dragAnimatedValue: any) => any; renderRightActions?: (progressAnimatedValue: any, dragAnimatedValue: any) => any; leftActionsContainerStyle: any; rightActionsContainerStyle: any; useNativeAnimations: boolean; animationOptions?: Object; containerStyle?: Object; childrenContainerStyle?: Object; disableHaptic?: boolean; }; type State = { dragX: Animated.Value; rowTranslation: Animated.Value; leftWidth: number | typeof undefined; rightOffset: number | typeof undefined; rowWidth: number | typeof undefined; }; export type SwipeableProps = Props; declare class Swipeable extends Component<Props, State> { static displayName: string; static defaultProps: { friction: number; overshootFriction: number; useNativeAnimations: boolean; fullLeftThreshold: number; fullRightThreshold: number; }; constructor(props: Props); _triggerHaptic: () => false | void; _handleDrag: (e: any) => void; getTransX: () => Animated.AnimatedInterpolation<string | number>; getShowLeftAction: () => Animated.Value | Animated.AnimatedInterpolation<string | number>; getLeftActionTranslate: () => Animated.AnimatedInterpolation<string | number>; getShowRightAction: () => Animated.Value | Animated.AnimatedInterpolation<string | number>; getRightActionTranslate: () => Animated.AnimatedInterpolation<string | number>; _onTapHandlerStateChange: ({ nativeEvent }: { nativeEvent: any; }) => void; _onHandlerStateChange: ({ nativeEvent }: { nativeEvent: any; }) => void; _hasLeftActions: boolean; _hasRightActions: boolean; _handleRelease: (nativeEvent: any) => void; _animateRow: (fromValue: any, toValue: any, velocityX: any) => void; _currentOffset: () => number; close: () => void; openLeft: () => void; openLeftFull: () => void; toggleLeft: () => void; openRight: () => void; openRightFull: () => void; _onRowLayout: ({ nativeEvent }: { nativeEvent: any; }) => void; _onLeftLayout: ({ nativeEvent }: { nativeEvent: any; }) => void; _onRightLayout: ({ nativeEvent }: { nativeEvent: any; }) => void; handleMeasure: (name: any, nativeEvent: any) => void; render(): React.JSX.Element; } export default Swipeable;