2020-03-07 11:49:32 +01:00
|
|
|
import * as React from 'react';
|
|
|
|
import {IconButton, withTheme} from 'react-native-paper';
|
|
|
|
|
2020-03-29 14:46:44 +02:00
|
|
|
/**
|
|
|
|
* Component used to display a header button
|
|
|
|
*
|
|
|
|
* @param props Props to pass to the component
|
|
|
|
* @return {*}
|
|
|
|
*/
|
2020-03-07 11:49:32 +01:00
|
|
|
function HeaderButton(props) {
|
2020-03-29 14:46:44 +02:00
|
|
|
const {colors} = props.theme;
|
2020-03-07 11:49:32 +01:00
|
|
|
return (
|
|
|
|
<IconButton
|
|
|
|
icon={props.icon}
|
|
|
|
size={26}
|
|
|
|
color={colors.text}
|
|
|
|
onPress={props.onPress}
|
|
|
|
/>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
export default withTheme(HeaderButton);
|