UNPKG

@react-native-vector-icons/icomoon

Version:
19 lines (17 loc) 621 B
"use strict"; /** * Fontello icon set component. * Usage: <Fontello name="icon-name" size={20} color="#4F8EF7" /> */ import { createIconSet } from '@react-native-vector-icons/common'; export default (config, fontFamilyArg, fontFile) => { const glyphMap = {}; config.icons.forEach(icon => { icon.properties.name.split(/\s*,\s*/g).forEach(name => { glyphMap[name] = icon.properties.code; }); }); const fontFamily = fontFamilyArg || config.preferences.fontPref.metadata.fontFamily; return createIconSet(glyphMap, fontFamily, fontFile || `${fontFamily}.ttf`); }; //# sourceMappingURL=index.js.map