UNPKG

2.06 kBTypeScriptView Raw
1import * as React from 'react';
2import { ColorValue, GestureResponderEvent, StyleProp, View, ViewStyle } from 'react-native';
3import type { PressableProps, PressableStateCallbackType } from './Pressable';
4import type { ThemeProp } from '../../types';
5export declare type Props = PressableProps & {
6 /**
7 * Whether to render the ripple outside the view bounds.
8 */
9 borderless?: boolean;
10 /**
11 * Type of background drawabale to display the feedback (Android).
12 * https://reactnative.dev/docs/pressable#rippleconfig
13 */
14 background?: Object;
15 /**
16 * Whether to start the ripple at the center (Web).
17 */
18 centered?: boolean;
19 /**
20 * Whether to prevent interaction with the touchable.
21 */
22 disabled?: boolean;
23 /**
24 * Function to execute on press. If not set, will cause the touchable to be disabled.
25 */
26 onPress?: (e: GestureResponderEvent) => void;
27 /**
28 * Function to execute on long press.
29 */
30 onLongPress?: (e: GestureResponderEvent) => void;
31 /**
32 * Function to execute immediately when a touch is engaged, before `onPressOut` and `onPress`.
33 */
34 onPressIn?: (e: GestureResponderEvent) => void;
35 /**
36 * Function to execute when a touch is released.
37 */
38 onPressOut?: (e: GestureResponderEvent) => void;
39 /**
40 * Color of the ripple effect (Android >= 5.0 and Web).
41 */
42 rippleColor?: ColorValue;
43 /**
44 * Color of the underlay for the highlight effect (Android < 5.0 and iOS).
45 */
46 underlayColor?: string;
47 /**
48 * Content of the `TouchableRipple`.
49 */
50 children: ((state: PressableStateCallbackType) => React.ReactNode) | React.ReactNode;
51 style?: StyleProp<ViewStyle> | ((state: PressableStateCallbackType) => StyleProp<ViewStyle>) | undefined;
52 /**
53 * @optional
54 */
55 theme?: ThemeProp;
56};
57declare const _default: import("../../utils/forwardRef").ForwardRefComponent<View, Props> & {
58 supported: boolean;
59};
60export default _default;
61//# sourceMappingURL=TouchableRipple.d.ts.map
\No newline at end of file