import React from "react";
import { View, Text, StyleSheet, Image, TouchableOpacity } from "react-native";
import styles from "./style";
const ItemGrid = ({ item ,onPress }) => {
   const IconComponent = item.icon;
  return (
    <TouchableOpacity
      onPress={onPress}
      style={styles.menu_item}
    >
      <View style={styles.icon_container}>
        <IconComponent 
          width={35} 
          height={35} 
        />
      </View>
      <Text style={styles.menu_text}>{item.title}</Text>
    </TouchableOpacity>
  );
};

export default ItemGrid;

