import Icon from "@expo/vector-icons/MaterialCommunityIcons";
import { useContext } from "react";
import { AppContext } from "../../utils";

export default function MyIcon({ style, name, color, size }) {
  const appContext = useContext(AppContext);

  const iconColor = color === undefined ? appContext.appTheme.icon : color;

  return <Icon style={style} name={name} color={iconColor} size={size} />;
}
