eletrotupi / tcc/ commit / 220d161

frontend: add more icons + note

Pedro Lucas Porcellis porcellis@eletrotupi.com · 5 months ago 220d1611f18fcb1e6df7439a2c5cd8cbd19a8054 Browse files
Parents 286fe93
Changed files
1
Additions
+7
Deletions
0
frontend/components/ui/icon-symbol.tsx
1 1
// Fallback for using MaterialIcons on Android and web.
2 2

3 3
import MaterialIcons from '@expo/vector-icons/MaterialIcons';
4 4
import { SymbolWeight, SymbolViewProps } from 'expo-symbols';
5 5
import { ComponentProps } from 'react';
10 10

11 11
/**
12 12
 * Add your SF Symbols to Material Icons mappings here.
13 13
 * - see Material Icons in the [Icons Directory](https://icons.expo.fyi).
14 14
 * - see SF Symbols in the [SF Symbols](https://developer.apple.com/sf-symbols/) app.
15 +
 *
16 +
 * TODO: We might get rid of this completely and just wrap a <MeterialIcons>
17 +
 * since we won't have iOS stuff
15 18
 */
16 19
const MAPPING = {
17 20
  'house.fill': 'home',
21 +
  'add-circle': 'add-circle',
22 +
  'history': 'history',
23 +
  'lightbulb-outline': 'lightbulb-outline',
18 24
  'paperplane.fill': 'send',
19 25
  'chevron.left.forwardslash.chevron.right': 'code',
20 26
  'chevron.right': 'chevron-right',
27 +
  'bolt': 'bolt',
21 28
  'settings.fill': 'settings'
22 29
} as IconMapping;
23 30

24 31
/**
25 32
 * An icon component that uses native SF Symbols on iOS, and Material Icons on Android and web.
38 45
  style?: StyleProp<TextStyle>;
39 46
  weight?: SymbolWeight;
40 47
}) {
41 48
  return <MaterialIcons color={color} size={size} name={MAPPING[name]} style={style} />;
42 49
}