tech-tracker-expo/components/ui/IconSymbol.ios.tsx

33 lines
602 B
TypeScript
Raw Normal View History

2025-01-28 08:19:46 -06:00
import { SymbolView, SymbolViewProps, SymbolWeight } from 'expo-symbols';
import { StyleProp, ViewStyle } from 'react-native';
export const IconSymbol = ({
2025-01-28 08:19:46 -06:00
name,
size = 24,
color,
style,
weight = 'regular',
}: {
name: SymbolViewProps['name'];
size?: number;
color: string;
style?: StyleProp<ViewStyle>;
weight?: SymbolWeight;
}) => {
2025-01-28 08:19:46 -06:00
return (
<SymbolView
weight={weight}
tintColor={color}
2025-01-28 08:45:02 -06:00
resizeMode='scaleAspectFit'
2025-01-28 08:19:46 -06:00
name={name}
style={[
{
width: size,
height: size,
},
style,
]}
/>
);
};