import React, { FunctionComponent } from 'react'; import { Image, ImageSourcePropType, ImageStyle, TouchableOpacity, ViewStyle, } from 'react-native'; import { IButtonProps, IImageButtonStyleProps, IStyledProps } from './types'; export interface IImageButtonProps extends IButtonProps, IStyledProps { imageSource: ImageSourcePropType; } export interface IImageButton extends FunctionComponent {} export const ImageButton: IImageButton = ({ style, imageSource, onPress, onLongPress, }) => { const mergedStyle = { ...buttonStyle, ...style }; return ( ); }; const buttonStyle = { container: { display: 'flex', flexDirection: 'row', justifyContent: 'space-around', } as ViewStyle, image: { width: 40, height: 40, }, };