You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

IconSymbol.ios.tsx 598B

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