1 | /**
|
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
|
3 | *
|
4 | * This source code is licensed under the MIT license found in the
|
5 | * LICENSE file in the root directory of this source tree.
|
6 | *
|
7 | * @format
|
8 | */
|
9 |
|
10 | import type * as React from 'react';
|
11 | import {View} from '../../Components/View/View';
|
12 | import {TouchableWithoutFeedbackProps} from './TouchableWithoutFeedback';
|
13 |
|
14 | export interface TVProps {
|
15 | /**
|
16 | * *(Apple TV only)* TV preferred focus (see documentation for the View component).
|
17 | *
|
18 | * @platform ios
|
19 | */
|
20 | hasTVPreferredFocus?: boolean | undefined;
|
21 |
|
22 | /**
|
23 | * Designates the next view to receive focus when the user navigates down. See the Android documentation.
|
24 | *
|
25 | * @platform android
|
26 | */
|
27 | nextFocusDown?: number | undefined;
|
28 |
|
29 | /**
|
30 | * Designates the next view to receive focus when the user navigates forward. See the Android documentation.
|
31 | *
|
32 | * @platform android
|
33 | */
|
34 | nextFocusForward?: number | undefined;
|
35 |
|
36 | /**
|
37 | * Designates the next view to receive focus when the user navigates left. See the Android documentation.
|
38 | *
|
39 | * @platform android
|
40 | */
|
41 | nextFocusLeft?: number | undefined;
|
42 |
|
43 | /**
|
44 | * Designates the next view to receive focus when the user navigates right. See the Android documentation.
|
45 | *
|
46 | * @platform android
|
47 | */
|
48 | nextFocusRight?: number | undefined;
|
49 |
|
50 | /**
|
51 | * Designates the next view to receive focus when the user navigates up. See the Android documentation.
|
52 | *
|
53 | * @platform android
|
54 | */
|
55 | nextFocusUp?: number | undefined;
|
56 | }
|
57 |
|
58 | /**
|
59 | * @see https://reactnative.dev/docs/touchableopacity#props
|
60 | */
|
61 | export interface TouchableOpacityProps
|
62 | extends TouchableWithoutFeedbackProps,
|
63 | TVProps {
|
64 | /**
|
65 | * Determines what the opacity of the wrapped view should be when touch is active.
|
66 | * Defaults to 0.2
|
67 | */
|
68 | activeOpacity?: number | undefined;
|
69 | }
|
70 |
|
71 | /**
|
72 | * A wrapper for making views respond properly to touches.
|
73 | * On press down, the opacity of the wrapped view is decreased, dimming it.
|
74 | * This is done without actually changing the view hierarchy,
|
75 | * and in general is easy to add to an app without weird side-effects.
|
76 | *
|
77 | * @see https://reactnative.dev/docs/touchableopacity
|
78 | */
|
79 | export const TouchableOpacity: React.ForwardRefExoticComponent<
|
80 | React.PropsWithoutRef<TouchableOpacityProps> & React.RefAttributes<View>
|
81 | >;
|