1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 | import type * as React from 'react';
|
11 | import {ColorValue, StyleProp} from '../../StyleSheet/StyleSheet';
|
12 | import {ViewStyle} from '../../StyleSheet/StyleSheetTypes';
|
13 | import {View} from '../../Components/View/View';
|
14 | import {TouchableWithoutFeedbackProps} from './TouchableWithoutFeedback';
|
15 |
|
16 |
|
17 |
|
18 |
|
19 | export interface TouchableHighlightProps extends TouchableWithoutFeedbackProps {
|
20 | |
21 |
|
22 |
|
23 | activeOpacity?: number | undefined;
|
24 |
|
25 | |
26 |
|
27 |
|
28 |
|
29 | onHideUnderlay?: (() => void) | undefined;
|
30 |
|
31 | /**
|
32 | * Called immediately after the underlay is shown
|
33 | */
|
34 | onShowUnderlay?: (() => void) | undefined;
|
35 |
|
36 | /**
|
37 | * @see https://reactnative.dev/docs/view#style
|
38 | */
|
39 | style?: StyleProp<ViewStyle> | undefined;
|
40 |
|
41 | /**
|
42 | * The color of the underlay that will show through when the touch is active.
|
43 | */
|
44 | underlayColor?: ColorValue | undefined;
|
45 | }
|
46 |
|
47 | /**
|
48 | * A wrapper for making views respond properly to touches.
|
49 | * On press down, the opacity of the wrapped view is decreased,
|
50 | * which allows the underlay color to show through, darkening or tinting the view.
|
51 | * The underlay comes from adding a view to the view hierarchy,
|
52 | * which can sometimes cause unwanted visual artifacts if not used correctly,
|
53 | * for example if the backgroundColor of the wrapped view isn't explicitly set to an opaque color.
|
54 | *
|
55 | * NOTE: TouchableHighlight supports only one child
|
56 | * If you wish to have several child components, wrap them in a View.
|
57 | *
|
58 | * @see https://reactnative.dev/docs/touchablehighlight
|
59 | */
|
60 | export const TouchableHighlight: React.ForwardRefExoticComponent<
|
61 | React.PropsWithoutRef<TouchableHighlightProps> & React.RefAttributes<View>
|
62 | >;
|
63 |
|
\ | No newline at end of file |