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