1import Ionicons from '@expo/vector-icons/build/Ionicons'; 2import * as React from 'react'; 3import { TouchableOpacity, View } from 'react-native'; 4 5export function HeaderContainerRight( 6 props: React.ComponentProps<typeof View> & { 7 children?: any; 8 } 9) { 10 return <View {...props} style={[{ paddingRight: 8, flexDirection: 'row' }, props.style]} />; 11} 12 13type Props = { 14 color?: string; 15 disabled?: boolean; 16 name: string; 17 onPress: () => void; 18 size?: number; 19}; 20 21export default function HeaderIconButton({ 22 color = 'blue', 23 disabled, 24 name, 25 onPress, 26 size = 24, 27}: Props) { 28 return ( 29 <TouchableOpacity disabled={disabled} style={{ paddingHorizontal: 12 }} onPress={onPress}> 30 <Ionicons size={size} color={color} name={name as any} /> 31 </TouchableOpacity> 32 ); 33} 34