UNPKG

1.15 kBTypeScriptView Raw
1import { Animated, TouchableOpacityProps as RNTouchableOpacityProps } from 'react-native';
2import type { GenericTouchableProps } from './GenericTouchableProps';
3import * as React from 'react';
4import { Component } from 'react';
5/**
6 * @deprecated TouchableOpacity will be removed in the future version of Gesture Handler.
7 */
8export type TouchableOpacityProps = RNTouchableOpacityProps & GenericTouchableProps & {
9 useNativeAnimations?: boolean;
10};
11/**
12 * @deprecated TouchableOpacity will be removed in the future version of Gesture Handler.
13 *
14 * TouchableOpacity bases on timing animation which has been used in RN's core
15 */
16export default class TouchableOpacity extends Component<TouchableOpacityProps> {
17 static defaultProps: {
18 activeOpacity: number;
19 delayLongPress: number;
20 extraButtonProps: {
21 rippleColor: string;
22 exclusive: boolean;
23 };
24 };
25 getChildStyleOpacityWithDefault: () => number;
26 opacity: Animated.Value;
27 setOpacityTo: (value: number, duration: number) => void;
28 onStateChange: (_from: number, to: number) => void;
29 render(): React.JSX.Element;
30}