import { Ionicons } from '@expo/vector-icons';
import { navIcon } from '../../core/navIcons';
import { colors } from '../../constants/theme';

type Props = {
  name: string;
  size?: number;
  color?: string;
};

export function Icon({ name, size = 22, color = colors.text }: Props) {
  return <Ionicons name={navIcon(name)} size={size} color={color} />;
}
