UNPKG

@expo/vector-icons

Version:

Built-in support for 10 popular icon fonts and the tooling to create your own Icon components from your font and glyph map. This is a wrapper around react-native-vector-icons to make it compatible with Expo.

32 lines (29 loc) 1.23 kB
import _ from 'lodash'; export const IconFamilies = { Entypo: require('react-native-vector-icons/glyphmaps/Entypo.json'), EvilIcons: require('react-native-vector-icons/glyphmaps/EvilIcons.json'), Feather: require('react-native-vector-icons/glyphmaps/Feather.json'), FontAwesome: require('react-native-vector-icons/glyphmaps/FontAwesome.json'), Foundation: require('react-native-vector-icons/glyphmaps/Foundation.json'), Ionicons: require('react-native-vector-icons/glyphmaps/Ionicons.json'), MaterialIcons: require('react-native-vector-icons/glyphmaps/MaterialIcons.json'), MaterialCommunityIcons: require('react-native-vector-icons/glyphmaps/MaterialCommunityIcons.json'), SimpleLineIcons: require('react-native-vector-icons/glyphmaps/SimpleLineIcons.json'), Octicons: require('react-native-vector-icons/glyphmaps/Octicons.json'), Zocial: require('react-native-vector-icons/glyphmaps/Zocial.json'), }; export const IconsArray = _.reduce( Object.keys(IconFamilies), (arr, family) => { let icons = IconFamilies[family]; Object.keys(icons).forEach(iconName => { arr.push({ name: iconName, value: icons[iconName], family, }); }); return arr; }, [] );