this repo has no description
at main 598 B view raw
1import { SymbolView, SymbolViewProps, SymbolWeight } from 'expo-symbols'; 2import { StyleProp, ViewStyle } from 'react-native'; 3 4export function IconSymbol({ 5 name, 6 size = 24, 7 color, 8 style, 9 weight = 'regular', 10}: { 11 name: SymbolViewProps['name']; 12 size?: number; 13 color: string; 14 style?: StyleProp<ViewStyle>; 15 weight?: SymbolWeight; 16}) { 17 return ( 18 <SymbolView 19 weight={weight} 20 tintColor={color} 21 resizeMode="scaleAspectFit" 22 name={name} 23 style={[ 24 { 25 width: size, 26 height: size, 27 }, 28 style, 29 ]} 30 /> 31 ); 32}