2021-11-11 14:32:56 +00:00
|
|
|
// @flow
|
|
|
|
|
|
|
|
import React from 'react';
|
|
|
|
|
2022-01-25 12:55:57 +00:00
|
|
|
import { IconArrowBack } from '../../../../base/icons';
|
2021-11-11 14:32:56 +00:00
|
|
|
import HeaderNavigationButton
|
2022-01-25 12:55:57 +00:00
|
|
|
from '../HeaderNavigationButton';
|
2022-06-09 14:23:56 +00:00
|
|
|
import { navigationStyles } from '../styles';
|
2021-11-11 14:32:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Render header arrow back button for navigation.
|
|
|
|
*
|
|
|
|
* @param {Function} onPress - Callback for when the button is pressed
|
|
|
|
* function.
|
|
|
|
* @returns {ReactElement}
|
|
|
|
*/
|
|
|
|
export function renderArrowBackButton(onPress: Function) {
|
|
|
|
return (
|
|
|
|
<HeaderNavigationButton
|
2022-06-09 14:23:56 +00:00
|
|
|
buttonStyle = { navigationStyles.arrowBackStyle }
|
2021-11-11 14:32:56 +00:00
|
|
|
onPress = { onPress }
|
|
|
|
src = { IconArrowBack } />
|
|
|
|
);
|
|
|
|
}
|