/* @flow */ import * as React from 'react'; import { View, StyleSheet, Platform } from 'react-native'; import { Menu, Appbar, withTheme, Divider, Button } from 'react-native-paper'; import type { Theme } from 'react-native-paper/types'; type State = { visible1: boolean, visible2: boolean, }; type Props = { theme: Theme, navigation: any, }; const MORE_ICON = Platform.OS === 'ios' ? 'more-horiz' : 'more-vert'; class MenuExample extends React.Component { static navigationOptions = { header: null, }; state = { visible1: false, visible2: false, }; static title = 'Menu'; _openMenu1 = () => this.setState({ visible1: true }); _openMenu2 = () => this.setState({ visible2: true }); _closeMenu1 = () => this.setState({ visible1: false }); _closeMenu2 = () => this.setState({ visible2: false }); render() { const { theme: { colors: { background }, }, } = this.props; return ( this.props.navigation.goBack()} /> } > {}} title="Undo" /> {}} title="Redo" /> {}} title="Cut" disabled /> {}} title="Copy" disabled /> {}} title="Paste" /> Menu with icons } > {}} title="Undo" /> {}} title="Redo" /> {}} title="Cut" disabled /> {}} title="Copy" disabled /> {}} title="Paste" /> ); } } const styles = StyleSheet.create({ screen: { flex: 1, }, container: { flex: 1, alignItems: 'center', paddingTop: 48, }, }); export default withTheme(MenuExample);