import * as React from 'react' ; import { Alert } from 'react-native' ; import { ContextMenuView } from 'react-native-ios-context-menu' ; import type { ContextMenuExampleProps } from './SharedExampleTypes' ; import { ContextMenuCard } from '../components/ContextMenuCard' ; export function ContextMenuViewExample06 ( props ) { return ( < ContextMenuView style = { props . style } menuConfig = { { menuTitle : 'ContextMenuViewExample06' , menuItems : [ { actionKey : 'key-01' , actionTitle : 'Action #1' , icon : { type : 'IMAGE_SYSTEM' , imageValue : { systemName : 'folder' , } , } } , { menuTitle : 'Submenu...' , menuOptions : [ 'destructive' ] , menuItems : [ { actionKey : 'key-01-01' , actionTitle : 'Submenu Action #1' , icon : { type : 'IMAGE_SYSTEM' , imageValue : { systemName : 'star' , } , } } , { actionKey : 'key-01-02' , actionTitle : 'Submenu Action #2' , icon : { type : 'IMAGE_SYSTEM' , imageValue : { systemName : 'star.lefthalf.fill' , } , } } , { actionKey : 'key-01-03' , actionTitle : 'Submenu Action #3' , icon : { type : 'IMAGE_SYSTEM' , imageValue : { systemName : 'star.fill' , } , } } ] } ] , } } onPressMenuItem = { ( { nativeEvent } ) => { Alert . alert ( 'onPressMenuItem Event' , `actionKey: ${ nativeEvent . actionKey } - actionTitle: ${ nativeEvent . actionTitle }` ) ; } } > < ContextMenuCard index = { props . index } title = { 'ContextMenuViewExample06' } subtitle = { 'destructive submenu' } description = { [ `Same as Example #3 but the submenu has "destructive" in it's menuOptions` ] } / > < /ContextMenuView>); } ;