UNPKG

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