1import React from 'react';
2import { Image, ImageStyle, StyleProp } from 'react-native';
3
4import Icons from '../constants/Icons';
5
6export default function ExpoAPIIcon({
7  name,
8  style,
9}: {
10  name: string;
11  style?: StyleProp<ImageStyle>;
12}) {
13  const icon = React.useMemo(() => (Icons[name] || Icons.Default)(), [name]);
14  return <Image source={icon} style={[{ width: 24, height: 24 }, style]} />;
15}
16