import { HeaderButton } from '@react-navigation/elements'; import { DrawerActions, type ParamListBase, useNavigation, } from '@react-navigation/native'; import { Image, type ImageSourcePropType, StyleSheet } from 'react-native'; import type { DrawerNavigationProp } from '../types'; import toggleDrawerIcon from './assets/toggle-drawer-icon.png'; type Props = { accessibilityLabel?: string; pressColor?: string; pressOpacity?: number; tintColor?: string; imageSource?: ImageSourcePropType; testID?: string; }; export function DrawerToggleButton({ tintColor, accessibilityLabel = 'Show navigation menu', imageSource = toggleDrawerIcon, ...rest }: Props) { const navigation = useNavigation>(); return ( navigation.dispatch(DrawerActions.toggleDrawer())} > ); } const styles = StyleSheet.create({ icon: { height: 24, width: 24, marginVertical: 8, marginHorizontal: 5, }, });