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; onPress(): void; testID: string; } // Left export const Drawer = React.memo(({ navigation, testID, ...props }: Partial) => ( navigation.toggleDrawer()} testID={testID} {...props} /> )); 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 }: Partial) => ( )); export const Preferences = React.memo(({ onPress, testID, ...props }: Partial) => ( )); export const Legal = React.memo(({ navigation, testID }: Partial) => ( navigation.navigate('LegalView')} testID={testID} /> ));