1import Ionicons from '@expo/vector-icons/build/Ionicons';
2import React from 'react';
3import { StyleSheet, TouchableOpacity, TouchableOpacityProps } from 'react-native';
4
5type Props = TouchableOpacityProps & {
6  color?: string;
7  name: string;
8  size?: number;
9};
10
11const HeaderIconButton = ({ color = 'blue', disabled, name, onPress, size = 24 }: Props) => (
12  <TouchableOpacity disabled={disabled} style={styles.iconButton} onPress={onPress}>
13    <Ionicons size={size} color={color} name={name as any} />
14  </TouchableOpacity>
15);
16
17const styles = StyleSheet.create({
18  iconButton: {
19    paddingHorizontal: 12,
20  },
21});
22
23export default HeaderIconButton;
24