import Styles from "@/constants/Styles";
import { TouchableOpacity } from "react-native";
import ImageUser from "./imageNew";
import Text from "./Text";

type Props = {
   src: string
   label: string
   onClick?: () => void
}

export default function ImageWithLabel({ src, label, onClick }: Props) {
   return (
      <TouchableOpacity style={[Styles.contentItemCenter, Styles.mh03, { width: 55 }]} onPress={onClick}>
         <ImageUser src={src} border />
         <Text numberOfLines={1} ellipsizeMode="tail" style={[{ textAlign: 'center' }]}>{label}</Text>
      </TouchableOpacity>
   )
}