UNPKG

1.15 kBTypeScriptView Raw
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
10import type * as React from 'react';
11import {ColorValue} from '../StyleSheet/StyleSheet';
12import {TouchableNativeFeedbackProps} from './Touchable/TouchableNativeFeedback';
13import {TouchableOpacityProps} from './Touchable/TouchableOpacity';
14
15export interface ButtonProps
16 extends Pick<
17 TouchableNativeFeedbackProps & TouchableOpacityProps,
18 | 'accessibilityLabel'
19 | 'accessibilityState'
20 | 'hasTVPreferredFocus'
21 | 'nextFocusDown'
22 | 'nextFocusForward'
23 | 'nextFocusLeft'
24 | 'nextFocusRight'
25 | 'nextFocusUp'
26 | 'testID'
27 | 'disabled'
28 | 'onPress'
29 | 'touchSoundDisabled'
30 > {
31 /**
32 * Text to display inside the button. On Android the given title will be converted to the uppercased form.
33 */
34 title: string;
35
36 /**
37 * Color of the text (iOS), or background color of the button (Android).
38 */
39 color?: ColorValue | undefined;
40}
41
42export class Button extends React.Component<ButtonProps> {}