import React from 'react'; import { isIOS } from '../../utils/deviceInfo'; import I18n from '../../i18n'; import Container from './HeaderButtonContainer'; import Item from './HeaderButtonItem'; interface IHeaderButtonCommon { navigation?: any; // TODO: Evaluate proper type onPress?: () => void; testID?: string; } // Left export const Drawer = React.memo( ({ navigation, testID, onPress = () => navigation?.toggleDrawer(), ...props }: IHeaderButtonCommon) => ( ) ); export const CloseModal = React.memo( ({ navigation, testID, onPress = () => navigation?.pop(), ...props }: IHeaderButtonCommon) => ( ) ); export const CancelModal = React.memo(({ onPress, testID }: Partial) => ( {isIOS ? ( ) : ( )} )); // Right export const More = React.memo(({ onPress, testID }: Partial) => ( )); export const Download = React.memo(({ onPress, testID, ...props }: IHeaderButtonCommon) => ( )); export const Preferences = React.memo(({ onPress, testID, ...props }: IHeaderButtonCommon) => ( )); export const Legal = React.memo( ({ navigation, testID, onPress = () => navigation?.navigate('LegalView') }: IHeaderButtonCommon) => ( ) );