import * as React from 'react'; import { MaterialIcons } from '@expo/vector-icons'; import { Text } from 'react-native'; import { HeaderButtons, Item, HiddenItem, OverflowMenu, defaultOnOverflowMenuPress, } from 'react-navigation-header-buttons'; import type { ScreenProps } from '../NavTypes'; import { MaterialHeaderButton } from '../components/MaterialHeaderButton'; import { ScreenBody } from '../components/ScreenBody'; const RightHeader = () => ( alert('person')} /> alert('edit')} /> } pressColor="blue" onPress={(params) => { defaultOnOverflowMenuPress({ ...params, cancelButtonLabel: 'cancel - custom iOS label!', }); }} > alert('hidden shortcut')} /> ); export function UsageWithOverflow({ navigation, }: ScreenProps<'UsageWithOverflow'>) { React.useLayoutEffect(() => { navigation.setOptions({ headerRight: RightHeader, // title: '', }); }, [navigation]); return ( default overflow menu handler with custom cancel label ); }