@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.
17 lines (13 loc) • 391 B
JavaScript
import createIconSet from './create-icon-set';
export default function createIconSetFromFontello(
config,
fontFamilyArg,
fontFile
) {
const glyphMap = {};
config.glyphs.forEach(glyph => {
glyphMap[glyph.css] = glyph.code;
});
const fontFamily = fontFamilyArg || config.name || 'fontello';
return createIconSet(glyphMap, fontFamily, fontFile || `${fontFamily}.ttf`);
}