UNPKG

1.6 kBTypeScriptView Raw
1import * as React from 'react';
2import { StyleProp, TextStyle, ViewStyle } from 'react-native';
3import { IconSource } from '../Icon';
4declare type Props = {
5 /**
6 * Title text for the `MenuItem`.
7 */
8 title: React.ReactNode;
9 /**
10 * Icon to display for the `MenuItem`.
11 */
12 icon?: IconSource;
13 /**
14 * Whether the 'item' is disabled. A disabled 'item' is greyed out and `onPress` is not called on touch.
15 */
16 disabled?: boolean;
17 /**
18 * Function to execute on press.
19 */
20 onPress?: () => void;
21 /**
22 * @optional
23 */
24 style?: StyleProp<ViewStyle>;
25 contentStyle?: StyleProp<ViewStyle>;
26 titleStyle?: StyleProp<TextStyle>;
27 /**
28 * @optional
29 */
30 theme: ReactNativePaper.Theme;
31 /**
32 * TestID used for testing purposes
33 */
34 testID?: string;
35 /**
36 * Accessibility label for the Touchable. This is read by the screen reader when the user taps the component.
37 */
38 accessibilityLabel?: string;
39};
40declare const _default: React.ComponentType<Pick<Props, "style" | "title" | "onPress" | "testID" | "accessibilityLabel" | "icon" | "disabled" | "titleStyle" | "contentStyle"> & {
41 theme?: import("@callstack/react-theme-provider").$DeepPartial<ReactNativePaper.Theme> | undefined;
42}> & import("@callstack/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<Props> & {
43 ({ icon, title, disabled, onPress, style, contentStyle, testID, titleStyle, accessibilityLabel, theme, }: Props): JSX.Element;
44 displayName: string;
45}, {}>;
46export default _default;