1import { AndroidIcon, AppleIcon, AtSignIcon, ExpoGoLogo, iconSize, theme } from '@expo/styleguide'; 2 3import { PlatformName } from '~/types/common'; 4 5export type PlatformIconProps = { 6 platform?: PlatformName; 7}; 8 9export const PlatformIcon = ({ platform }: PlatformIconProps) => { 10 const size = iconSize['2xs']; 11 12 switch (platform) { 13 case 'ios': 14 return <AppleIcon color={theme.palette.blue12} size={size} />; 15 case 'android': 16 return <AndroidIcon color={theme.palette.green12} size={size} />; 17 case 'web': 18 return <AtSignIcon color={theme.palette.orange12} size={size} />; 19 case 'expo': 20 return ( 21 <ExpoGoLogo 22 width={iconSize['2xs']} 23 height={iconSize['2xs']} 24 color={theme.palette.purple12} 25 size={size} 26 /> 27 ); 28 default: 29 return null; 30 } 31}; 32