import React from 'react'; import { isIOS } from '../../lib/methods/helpers'; import I18n from '../../i18n'; import Container from './HeaderButtonContainer'; import Item, { IHeaderButtonItem } from './HeaderButtonItem'; interface IHeaderButtonCommon extends IHeaderButtonItem { navigation?: any; // TODO: Evaluate proper type } // 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, ...props }: IHeaderButtonCommon) => ( {isIOS ? ( ) : ( )} )); // Right export const More = React.memo(({ onPress, testID, ...props }: IHeaderButtonCommon) => ( )); 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'), ...props }: IHeaderButtonCommon) => ( ) );