2025-01-28 08:19:46 -06:00
|
|
|
import { SymbolView, SymbolViewProps, SymbolWeight } from 'expo-symbols';
|
|
|
|
import { StyleProp, ViewStyle } from 'react-native';
|
|
|
|
|
2025-01-28 10:17:33 -06:00
|
|
|
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 10:17:33 -06:00
|
|
|
}) => {
|
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,
|
|
|
|
]}
|
|
|
|
/>
|
|
|
|
);
|
2025-01-28 10:17:33 -06:00
|
|
|
};
|