docs/public/3.0/menu-item.html
A component to show a single list item inside a Menu.
import * as React from 'react';
import { View } from 'react-native';
import { Menu } from 'react-native-paper';
const MyComponent = () => (
<View style={{ flex: 1 }}>
<Menu.Item icon="redo" onPress={() => {}} title="Redo" />
<Menu.Item icon="undo" onPress={() => {}} title="Undo" />
<Menu.Item icon="content-cut" onPress={() => {}} title="Cut" disabled />
<Menu.Item icon="content-copy" onPress={() => {}} title="Copy" disabled />
<Menu.Item icon="content-paste" onPress={() => {}} title="Paste" />
</View>
);
export default MyComponent;
title (required)
Type: React.ReactNode
Title text for the MenuItem.
icon
Type: IconSource
Icon to display for the MenuItem.
disabled
Type: boolean
Whether the 'item' is disabled. A disabled 'item' is greyed out and onPress is not called on touch.
onPress
Type: () => void
Function to execute on press.
theme
Type: Theme
style
Type: StyleProp<ViewStyle>
titleStyle
Type: StyleProp<TextStyle>
testID
Type: string
TestID used for testing purposes