UNPKG

@react-native-vector-icons/icomoon

Version:
23 lines (22 loc) 745 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _common = require("@react-native-vector-icons/common"); /** * Fontello icon set component. * Usage: <Fontello name="icon-name" size={20} color="#4F8EF7" /> */ var _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 (0, _common.createIconSet)(glyphMap, fontFamily, fontFile || `${fontFamily}.ttf`); }; exports.default = _default; //# sourceMappingURL=index.js.map