Socket
Socket
Sign inDemoInstall

react-native-vector-icons

Package Overview
Dependencies
21
Maintainers
1
Versions
85
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 10.0.0 to 10.0.1

RNVectorIconsManager/RNVectorIconsManager.mm

7

dist/glyphmaps/FontAwesome6Free_meta.json

@@ -103,2 +103,3 @@ {

"dashcube",
"debian",
"deezer",

@@ -274,2 +275,3 @@ "delicious",

"odnoklassniki",
"odysee",
"old-republic",

@@ -375,2 +377,3 @@ "opencart",

"square-steam",
"square-threads",
"square-tumblr",

@@ -381,2 +384,3 @@ "square-twitter",

"square-whatsapp",
"square-x-twitter",
"square-xing",

@@ -395,2 +399,3 @@ "square-youtube",

"stripe",
"stubber",
"studiovinari",

@@ -411,2 +416,3 @@ "stumbleupon-circle",

"think-peaks",
"threads",
"tiktok",

@@ -462,2 +468,3 @@ "trade-federation",

"wpressr",
"x-twitter",
"xbox",

@@ -464,0 +471,0 @@ "xing",

@@ -2008,2 +2008,3 @@ {

"edge": 62082,
"threads": 58904,
"napster": 62418,

@@ -2065,2 +2066,3 @@ "square-snapchat": 62125,

"scribd": 62090,
"debian": 58891,
"openid": 61851,

@@ -2146,2 +2148,3 @@ "instalod": 57473,

"neos": 62994,
"square-threads": 58905,
"hackerrank": 62967,

@@ -2261,2 +2264,3 @@ "researchgate": 62712,

"erlang": 62365,
"x-twitter": 58907,
"cotton-bureau": 63646,

@@ -2411,5 +2415,7 @@ "dashcube": 61968,

"internet-explorer": 62059,
"stubber": 58823,
"telegram": 62150,
"telegram-plane": 62150,
"old-republic": 62736,
"odysee": 58822,
"square-whatsapp": 62476,

@@ -2426,2 +2432,3 @@ "whatsapp-square": 62476,

"quora": 62148,
"square-x-twitter": 58906,
"reacteurope": 63325,

@@ -2428,0 +2435,0 @@ "medium": 62010,

2

dist/lib/create-icon-set-from-fontawesome6.js

@@ -1,1 +0,1 @@

var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.FA6Style=void 0;exports.createFA6iconSet=createFA6iconSet;var _reactNative=require("react-native");var _createMultiStyleIconSet=_interopRequireDefault(require("./create-multi-style-icon-set"));var FA6Style={regular:'regular',light:'light',solid:'solid',brand:'brand',sharpSolid:'sharpSolid',duotone:'duotone',thin:'thin'};exports.FA6Style=FA6Style;function createFA6iconSet(glyphMap){var metadata=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var pro=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;var metadataKeys=Object.keys(metadata);var fontFamily="FontAwesome6"+(pro?'Pro':'Free');function fallbackFamily(glyph){for(var i=0;i<metadataKeys.length;i+=1){var family=metadataKeys[i];if(metadata[family].indexOf(glyph)!==-1){return family==='brands'?'brand':family;}}return'regular';}function glyphValidator(glyph,style){var family=style==='brand'?'brands':style;family=style==='sharpSolid'?'sharp-solid':style;if(metadataKeys.indexOf(family)===-1)return false;return metadata[family].indexOf(glyph)!==-1;}function createFontAwesomeStyle(style,fontWeight){var family=arguments.length>2&&arguments[2]!==undefined?arguments[2]:fontFamily;var styleName=style;var fontFile="FontAwesome6_"+(pro?"Pro_"+styleName:styleName)+".ttf";if(styleName==='Brands'){styleName='Regular';}if(styleName==='Duotone'){styleName='Solid';}return{fontFamily:family+"-"+styleName,fontFile:fontFile,fontStyle:_reactNative.Platform.select({ios:{fontWeight:fontWeight},default:{}}),glyphMap:glyphMap};}var brandIcons=createFontAwesomeStyle('Brands','400','FontAwesome6Brands');var lightIcons=createFontAwesomeStyle('Light','300');var regularIcons=createFontAwesomeStyle('Regular','400');var solidIcons=createFontAwesomeStyle('Solid','900');var sharpSolidIcons=createFontAwesomeStyle('Sharp_Solid','900');var duotoneIcons=createFontAwesomeStyle('Duotone','900','FontAwesome6Duotone');var thinIcons=createFontAwesomeStyle('Thin','100');var Icon=(0,_createMultiStyleIconSet.default)({brand:brandIcons,light:lightIcons,regular:regularIcons,solid:solidIcons,sharpSolid:sharpSolidIcons,duotone:duotoneIcons,thin:thinIcons},{defaultStyle:'regular',fallbackFamily:fallbackFamily,glyphValidator:glyphValidator});return Icon;}
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.FA6Style=void 0;exports.createFA6iconSet=createFA6iconSet;var _reactNative=require("react-native");var _createMultiStyleIconSet=_interopRequireDefault(require("./create-multi-style-icon-set"));var FA6Style={regular:'regular',light:'light',solid:'solid',brand:'brand',sharp:'sharp',sharpLight:'sharpLight',sharpSolid:'sharpSolid',duotone:'duotone',thin:'thin'};exports.FA6Style=FA6Style;function createFA6iconSet(glyphMap){var metadata=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var pro=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;var metadataKeys=Object.keys(metadata);var fontFamily="FontAwesome6"+(pro?'Pro':'Free');function fallbackFamily(glyph){for(var i=0;i<metadataKeys.length;i+=1){var family=metadataKeys[i];if(metadata[family].indexOf(glyph)!==-1){return family==='brands'?'brand':family;}}return'regular';}function glyphValidator(glyph,style){var family=style==='brand'?'brands':style;family=style==='sharpSolid'?'sharp-solid':style;if(metadataKeys.indexOf(family)===-1)return false;return metadata[family].indexOf(glyph)!==-1;}function createFontAwesomeStyle(style,fontWeight){var family=arguments.length>2&&arguments[2]!==undefined?arguments[2]:fontFamily;var styleName=style;var fontFile="FontAwesome6_"+(pro?"Pro_"+styleName:styleName)+".ttf";if(styleName==='Brands'){styleName='Regular';}if(styleName==='Duotone'){styleName='Solid';}styleName=styleName.replace('Sharp_','');return{fontFamily:family+"-"+styleName,fontFile:fontFile,fontStyle:_reactNative.Platform.select({ios:{fontWeight:fontWeight},default:{}}),glyphMap:glyphMap};}var brandIcons=createFontAwesomeStyle('Brands','400','FontAwesome6Brands');var lightIcons=createFontAwesomeStyle('Light','300');var regularIcons=createFontAwesomeStyle('Regular','400');var solidIcons=createFontAwesomeStyle('Solid','900');var sharpLightIcons=createFontAwesomeStyle('Sharp_Light','300','FontAwesome6Sharp');var sharpIcons=createFontAwesomeStyle('Sharp_Regular','400','FontAwesome6Sharp');var sharpSolidIcons=createFontAwesomeStyle('Sharp_Solid','900','FontAwesome6Sharp');var duotoneIcons=createFontAwesomeStyle('Duotone','900','FontAwesome6Duotone');var thinIcons=createFontAwesomeStyle('Thin','100');var Icon=(0,_createMultiStyleIconSet.default)({brand:brandIcons,light:lightIcons,regular:regularIcons,solid:solidIcons,sharp:sharpIcons,sharpLight:sharpLightIcons,sharpSolid:sharpSolidIcons,duotone:duotoneIcons,thin:thinIcons},{defaultStyle:'regular',fallbackFamily:fallbackFamily,glyphValidator:glyphValidator});return Icon;}

@@ -1,1 +0,1 @@

var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=createMultiStyleIconSet;var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _react=_interopRequireWildcard(require("react"));var _propTypes=_interopRequireDefault(require("prop-types"));var _createIconSet=_interopRequireWildcard(require("./create-icon-set"));var _jsxFileName="/home/runner/work/react-native-vector-icons/react-native-vector-icons/lib/create-multi-style-icon-set.js";function _getRequireWildcardCache(nodeInterop){if(typeof WeakMap!=="function")return null;var cacheBabelInterop=new WeakMap();var cacheNodeInterop=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop;})(nodeInterop);}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule){return obj;}if(obj===null||typeof obj!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(key!=="default"&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=(0,_getPrototypeOf2.default)(Derived),result;if(hasNativeReflectConstruct){var NewTarget=(0,_getPrototypeOf2.default)(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return(0,_possibleConstructorReturn2.default)(this,result);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}function createMultiStyleIconSet(styles){var optionsInput=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var styleNames=Object.keys(styles);if(styleNames.length===0){throw new Error('You need to add at least one style');}var options=(0,_extends2.default)({defaultStyle:styleNames[0],fallbackFamily:function fallbackFamily(){return styleNames[0];},glyphValidator:function glyphValidator(){return true;}},optionsInput);var iconSets=styleNames.reduce(function(acc,name){var style=styles[name];acc[name]=(0,_createIconSet.default)(style.glyphMap||{},style.fontFamily||'',style.fontFile||'',style.fontStyle||{});return acc;},{});function styleFromProps(props){return Object.keys(props).reduce(function(result,propName){return styleNames.indexOf(propName)!==-1&&props[propName]===true?propName:result;},options.defaultStyle);}function getIconSetForProps(props){var name=props.name;var style=styleFromProps(props);if(options.glyphValidator(name,style))return iconSets[style];var family=options.fallbackFamily(name);if(styleNames.indexOf(family)===-1){return options.defaultStyle;}return iconSets[family];}function selectIconClass(iconSet,iconClass){return iconClass.length>0?iconSet[iconClass]:iconSet;}function reduceProps(props){return Object.keys(props).reduce(function(acc,prop){if(styleNames.indexOf(prop)===-1){acc[prop]=props[prop];}return acc;},{});}function getStyledIconSet(style){var name=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'';if(styleNames.indexOf(style)===-1){return iconSets[options.defaultStyle];}return!name?iconSets[styleFromProps((0,_defineProperty2.default)({},style,true))]:getIconSetForProps((0,_defineProperty2.default)({name:name},style,true));}function getImageSource(name){var size=arguments.length>1&&arguments[1]!==undefined?arguments[1]:_createIconSet.DEFAULT_ICON_SIZE;var color=arguments.length>2&&arguments[2]!==undefined?arguments[2]:_createIconSet.DEFAULT_ICON_COLOR;var style=arguments.length>3&&arguments[3]!==undefined?arguments[3]:options.defaultStyle;return getStyledIconSet(style,name).getImageSource(name,size,color);}function getFontFamily(){var style=arguments.length>0&&arguments[0]!==undefined?arguments[0]:options.defaultStyle;return getStyledIconSet(style).getFontFamily();}function getRawGlyphMap(){var style=arguments.length>0&&arguments[0]!==undefined?arguments[0]:options.defaultStyle;return getStyledIconSet(style).getRawGlyphMap();}function hasIcon(name){var style=arguments.length>1&&arguments[1]!==undefined?arguments[1]:options.defaultStyle;return options.glyphValidator(name,style);}function createStyledIconClass(){var selectClass=arguments.length>0&&arguments[0]!==undefined?arguments[0]:'';var IconClass=function(_PureComponent){(0,_inherits2.default)(IconClass,_PureComponent);var _super=_createSuper(IconClass);function IconClass(){(0,_classCallCheck2.default)(this,IconClass);return _super.apply(this,arguments);}(0,_createClass2.default)(IconClass,[{key:"render",value:function render(){var selectedIconSet=getIconSetForProps(this.props);var SelectedIconClass=selectIconClass(selectedIconSet,selectClass);var props=reduceProps(this.props);return _react.default.createElement(SelectedIconClass,(0,_extends2.default)({},props,{__self:this,__source:{fileName:_jsxFileName,lineNumber:123,columnNumber:16}}));}}]);return IconClass;}(_react.PureComponent);IconClass.propTypes=styleNames.reduce(function(acc,name){acc[name]=_propTypes.default.bool;return acc;},{});IconClass.defaultProps=styleNames.reduce(function(acc,name){acc[name]=false;return acc;},{});return IconClass;}var Icon=createStyledIconClass();Icon.Button=createStyledIconClass('Button');Icon.getStyledIconSet=getStyledIconSet;Icon.getImageSource=getImageSource;Icon.getFontFamily=getFontFamily;Icon.getRawGlyphMap=getRawGlyphMap;Icon.hasIcon=hasIcon;return Icon;}
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=createMultiStyleIconSet;var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _react=_interopRequireWildcard(require("react"));var _propTypes=_interopRequireDefault(require("prop-types"));var _createIconSet=_interopRequireWildcard(require("./create-icon-set"));var _jsxFileName="/home/runner/work/react-native-vector-icons/react-native-vector-icons/lib/create-multi-style-icon-set.js";function _getRequireWildcardCache(nodeInterop){if(typeof WeakMap!=="function")return null;var cacheBabelInterop=new WeakMap();var cacheNodeInterop=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop;})(nodeInterop);}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule){return obj;}if(obj===null||typeof obj!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(key!=="default"&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=(0,_getPrototypeOf2.default)(Derived),result;if(hasNativeReflectConstruct){var NewTarget=(0,_getPrototypeOf2.default)(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return(0,_possibleConstructorReturn2.default)(this,result);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}function createMultiStyleIconSet(styles){var optionsInput=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var styleNames=Object.keys(styles);if(styleNames.length===0){throw new Error('You need to add at least one style');}var options=(0,_extends2.default)({defaultStyle:styleNames[0],fallbackFamily:function fallbackFamily(){return styleNames[0];},glyphValidator:function glyphValidator(){return true;}},optionsInput);var iconSets=styleNames.reduce(function(acc,name){var style=styles[name];acc[name]=(0,_createIconSet.default)(style.glyphMap||{},style.fontFamily||'',style.fontFile||'',style.fontStyle||{});return acc;},{});function styleFromProps(props){return Object.keys(props).reduce(function(result,propName){return styleNames.indexOf(propName)!==-1&&props[propName]===true?propName:result;},options.defaultStyle);}function getIconSetForProps(props){var name=props.name;var style=styleFromProps(props);if(options.glyphValidator(name,style))return iconSets[style];var family=options.fallbackFamily(name);if(styleNames.indexOf(family)===-1){return options.defaultStyle;}return iconSets[family];}function selectIconClass(iconSet,iconClass){return iconClass.length>0?iconSet[iconClass]:iconSet;}function reduceProps(props){return Object.keys(props).reduce(function(acc,prop){if(styleNames.indexOf(prop)===-1){acc[prop]=props[prop];}return acc;},{});}function getStyledIconSet(style){var name=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'';if(styleNames.indexOf(style)===-1){return iconSets[options.defaultStyle];}return!name?iconSets[styleFromProps((0,_defineProperty2.default)({},style,true))]:getIconSetForProps((0,_defineProperty2.default)({name:name},style,true));}function getImageSource(name){var size=arguments.length>1&&arguments[1]!==undefined?arguments[1]:_createIconSet.DEFAULT_ICON_SIZE;var color=arguments.length>2&&arguments[2]!==undefined?arguments[2]:_createIconSet.DEFAULT_ICON_COLOR;var style=arguments.length>3&&arguments[3]!==undefined?arguments[3]:options.defaultStyle;return getStyledIconSet(style,name).getImageSource(name,size,color);}function getImageSourceSync(name){var size=arguments.length>1&&arguments[1]!==undefined?arguments[1]:_createIconSet.DEFAULT_ICON_SIZE;var color=arguments.length>2&&arguments[2]!==undefined?arguments[2]:_createIconSet.DEFAULT_ICON_COLOR;var style=arguments.length>3&&arguments[3]!==undefined?arguments[3]:options.defaultStyle;return getStyledIconSet(style,name).getImageSourceSync(name,size,color);}function getFontFamily(){var style=arguments.length>0&&arguments[0]!==undefined?arguments[0]:options.defaultStyle;return getStyledIconSet(style).getFontFamily();}function getRawGlyphMap(){var style=arguments.length>0&&arguments[0]!==undefined?arguments[0]:options.defaultStyle;return getStyledIconSet(style).getRawGlyphMap();}function hasIcon(name){var style=arguments.length>1&&arguments[1]!==undefined?arguments[1]:options.defaultStyle;return options.glyphValidator(name,style);}function createStyledIconClass(){var selectClass=arguments.length>0&&arguments[0]!==undefined?arguments[0]:'';var IconClass=function(_PureComponent){(0,_inherits2.default)(IconClass,_PureComponent);var _super=_createSuper(IconClass);function IconClass(){(0,_classCallCheck2.default)(this,IconClass);return _super.apply(this,arguments);}(0,_createClass2.default)(IconClass,[{key:"render",value:function render(){var selectedIconSet=getIconSetForProps(this.props);var SelectedIconClass=selectIconClass(selectedIconSet,selectClass);var props=reduceProps(this.props);return _react.default.createElement(SelectedIconClass,(0,_extends2.default)({},props,{__self:this,__source:{fileName:_jsxFileName,lineNumber:132,columnNumber:16}}));}}]);return IconClass;}(_react.PureComponent);IconClass.propTypes=styleNames.reduce(function(acc,name){acc[name]=_propTypes.default.bool;return acc;},{});IconClass.defaultProps=styleNames.reduce(function(acc,name){acc[name]=false;return acc;},{});return IconClass;}var Icon=createStyledIconClass();Icon.Button=createStyledIconClass('Button');Icon.getStyledIconSet=getStyledIconSet;Icon.getImageSource=getImageSource;Icon.getImageSourceSync=getImageSourceSync;Icon.getFontFamily=getFontFamily;Icon.getRawGlyphMap=getRawGlyphMap;Icon.hasIcon=hasIcon;return Icon;}

@@ -44,2 +44,4 @@ # FontAwesome 6

| **sharpSolid** | Uses the Sharp Solid font (pro) or Regular (Free) |
| **sharpLight** | Uses the Sharp Light font (pro) or Regular (Free) |
| **sharp** | Uses the Sharp font (pro) or Regular (Free) |

@@ -65,9 +67,11 @@ No specified type indicates Regular font.

const FA6Style = {
regular: 0,
light: 1,
solid: 2,
brand: 3,
light: 4,
duotone: 5,
sharpSolid: 6,
regular: 'regular',
light: 'light',
solid: 'solid',
brand: 'brand',
sharp: 'sharp',
sharpLight: 'sharpLight',
sharpLight: 'sharpSolid',
duotone: 'duotone',
thin: 'thin',
};

@@ -74,0 +78,0 @@ ```

@@ -103,2 +103,3 @@ {

"dashcube",
"debian",
"deezer",

@@ -274,2 +275,3 @@ "delicious",

"odnoklassniki",
"odysee",
"old-republic",

@@ -375,2 +377,3 @@ "opencart",

"square-steam",
"square-threads",
"square-tumblr",

@@ -381,2 +384,3 @@ "square-twitter",

"square-whatsapp",
"square-x-twitter",
"square-xing",

@@ -395,2 +399,3 @@ "square-youtube",

"stripe",
"stubber",
"studiovinari",

@@ -411,2 +416,3 @@ "stumbleupon-circle",

"think-peaks",
"threads",
"tiktok",

@@ -462,2 +468,3 @@ "trade-federation",

"wpressr",
"x-twitter",
"xbox",

@@ -464,0 +471,0 @@ "xing",

@@ -2008,2 +2008,3 @@ {

"edge": 62082,
"threads": 58904,
"napster": 62418,

@@ -2065,2 +2066,3 @@ "square-snapchat": 62125,

"scribd": 62090,
"debian": 58891,
"openid": 61851,

@@ -2146,2 +2148,3 @@ "instalod": 57473,

"neos": 62994,
"square-threads": 58905,
"hackerrank": 62967,

@@ -2261,2 +2264,3 @@ "researchgate": 62712,

"erlang": 62365,
"x-twitter": 58907,
"cotton-bureau": 63646,

@@ -2411,5 +2415,7 @@ "dashcube": 61968,

"internet-explorer": 62059,
"stubber": 58823,
"telegram": 62150,
"telegram-plane": 62150,
"old-republic": 62736,
"odysee": 58822,
"square-whatsapp": 62476,

@@ -2426,2 +2432,3 @@ "whatsapp-square": 62476,

"quora": 62148,
"square-x-twitter": 58906,
"reacteurope": 63325,

@@ -2428,0 +2435,0 @@ "medium": 62010,

@@ -9,2 +9,4 @@ import { Platform } from 'react-native';

brand: 'brand',
sharp: 'sharp',
sharpLight: 'sharpLight',
sharpSolid: 'sharpSolid',

@@ -49,2 +51,4 @@ duotone: 'duotone',

styleName = styleName.replace('Sharp_', '');
return {

@@ -71,3 +75,17 @@ fontFamily: `${family}-${styleName}`,

const solidIcons = createFontAwesomeStyle('Solid', '900');
const sharpSolidIcons = createFontAwesomeStyle('Sharp_Solid', '900');
const sharpLightIcons = createFontAwesomeStyle(
'Sharp_Light',
'300',
'FontAwesome6Sharp'
);
const sharpIcons = createFontAwesomeStyle(
'Sharp_Regular',
'400',
'FontAwesome6Sharp'
);
const sharpSolidIcons = createFontAwesomeStyle(
'Sharp_Solid',
'900',
'FontAwesome6Sharp'
);
const duotoneIcons = createFontAwesomeStyle(

@@ -85,2 +103,4 @@ 'Duotone',

solid: solidIcons,
sharp: sharpIcons,
sharpLight: sharpLightIcons,
sharpSolid: sharpSolidIcons,

@@ -87,0 +107,0 @@ duotone: duotoneIcons,

@@ -94,2 +94,11 @@ import React, { PureComponent } from 'react';

function getImageSourceSync(
name,
size = DEFAULT_ICON_SIZE,
color = DEFAULT_ICON_COLOR,
style = options.defaultStyle
) {
return getStyledIconSet(style, name).getImageSourceSync(name, size, color);
}
function getFontFamily(style = options.defaultStyle) {

@@ -135,2 +144,3 @@ return getStyledIconSet(style).getFontFamily();

Icon.getImageSource = getImageSource;
Icon.getImageSourceSync = getImageSourceSync;
Icon.getFontFamily = getFontFamily;

@@ -137,0 +147,0 @@ Icon.getRawGlyphMap = getRawGlyphMap;

{
"name": "react-native-vector-icons",
"version": "10.0.0",
"version": "10.0.1",
"description": "Customizable Icons for React Native with support for NavBar/TabBar, image source and full styling.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -5,6 +5,8 @@ ![Vector Icons for React Native](https://cloud.githubusercontent.com/assets/378279/12009887/33f4ae1c-ac8d-11e5-8666-7a87458753ee.png)

Perfect for buttons, logos and nav/tab bars. Easy to extend, style and integrate into your project.
# React Native Vector Icons
If you want to use `.svg` files natively – try [`react-native-vector-image`](https://github.com/oblador/react-native-vector-image).
Elevate your React Native applications with the power of customizable vector icons. Ideal for embellishing buttons, logos, and navigation or tab bars, these icons seamlessly integrate into your projects. Their versatility makes extension and styling effortless.
For the integration of `.svg` files natively, you can explore [`react-native-vector-image`](https://github.com/oblador/react-native-vector-image).
## Table of Contents

@@ -14,132 +16,137 @@

- [Installation](#installation)
- [iOS](#ios)
- [Android](#android)
- [OSX](#osx-via-react-native-desktop)
- [Windows](#windows-via-react-native-windows)
- [Web](#web-with-webpack)
- [iOS Setup](#ios-setup)
- [Android Setup](#android-setup)
- [macOS Setup](#macos-setup)
- [Windows Setup](#windows-setup)
- [Web Setup](#web-setup)
- [Upgrading](#upgrading)
- [Icon Component](#icon-component)
- [Icon.Button Component](#iconbutton-component)
- [Usage as PNG image/source object](#usage-as-png-imagesource-object)
- [TabBar](#tabbar)
- [Multi-style fonts](#multi-style-fonts)
- [Usage as PNG Image/Source Object](#usage-as-png-imagesource-object)
- [Multi-Style Fonts](#multi-style-fonts)
- [Custom Fonts](#custom-fonts)
- [Animation](#animation)
- [Examples](#examples)
- [Generating your own icon set from a CSS file](#generating-your-own-icon-set-from-a-css-file)
- [Changelog](#changelog)
- [Usage Examples](#usage-examples)
- [TabBar](#tabbar)
- [Generating Your Own Icon Set from a CSS File](#generating-your-own-icon-set-from-a-css-file)
- [Changelog](https://github.com/oblador/react-native-vector-icons/releases)
- [Troubleshooting](#troubleshooting)
- [License](#license)
## Sponsoring
## Sponsorship
If you find the library useful, please consider [sponsoring](https://github.com/sponsors/oblador). Things I have planned is to split up the repo into a monorepo, that would enable individual versioning of icon sets, better performance, smaller bundle and easier for the community to publish their own.
Should you find this library beneficial, kindly contemplate the option of [sponsoring](https://github.com/sponsors/oblador). Our envisioned endeavors encompass the restructuring of the repository into a monorepo architecture. This transition will empower independent versioning of icon sets, enhance performance, reduce bundle size, and simplify community contributions. Your sponsorship plays a pivotal role in materializing these advancements.
## Bundled Icon Sets
[Browse all](https://oblador.github.io/react-native-vector-icons/).
[Explore all icons](https://oblador.github.io/react-native-vector-icons/).
- [`AntDesign`](https://ant.design/) by AntFinance (**298** icons)
- [`Entypo`](http://entypo.com) by Daniel Bruce (v1.0.1 **411** icons)
- [`EvilIcons`](http://evil-icons.io) by Alexander Madyankin & Roman Shamin (v1.10.1, **70** icons)
- [`Feather`](http://feathericons.com) by Cole Bemis & Contributors (v4.28.0, **286** icons)
- [`FontAwesome`](http://fortawesome.github.io/Font-Awesome/icons/) by Dave Gandy (v4.7.0, **675** icons)
- [`FontAwesome 5`](https://fontawesome.com/v5/icons/) by Fonticons, Inc. (v5.15.3, 1598 (free) **7848** (pro) icons)
- [`FontAwesome 6`](https://fontawesome.com) by Fonticons, Inc. (v6.1.2, 2016 (free) **16150** (pro) icons)
- [`Fontisto`](https://github.com/kenangundogan/fontisto) by Kenan Gündoğan (v3.0.4, **615** icons)
- [`Foundation`](http://zurb.com/playground/foundation-icon-fonts-3) by ZURB, Inc. (v3.0, **283** icons)
- [`Ionicons`](https://ionicons.com/) by Ionic (v7.1.0, **1338** icons)
- [`MaterialIcons`](https://www.google.com/design/icons/) by Google, Inc. (v4.0.0, **2189** icons)
- [`MaterialCommunityIcons`](https://materialdesignicons.com/) by MaterialDesignIcons.com (v6.5.95, **6596** icons)
- [`Octicons`](http://octicons.github.com) by Github, Inc. (v16.3.1, **250** icons)
- [`Zocial`](http://zocial.smcllns.com/) by Sam Collins (v1.4.0, **100** icons)
- [`SimpleLineIcons`](https://simplelineicons.github.io/) by Sabbir & Contributors (v2.5.5, **189** icons)
- [`AntDesign`](https://ant.design/) from AntFinance (*298* icons)
- [`Entypo`](http://entypo.com) by Daniel Bruce (v1.0.1 with *411* icons)
- [`EvilIcons`](http://evil-icons.io) designed by Alexander Madyankin & Roman Shamin (v1.10.1 with *70* icons)
- [`Feather`](http://feathericons.com) created by Cole Bemis & Contributors (v4.28.0 featuring *286* icons)
- [`FontAwesome`](http://fortawesome.github.io/Font-Awesome/icons/) by Dave Gandy (v4.7.0 containing *675* icons)
- [`FontAwesome 5`](https://fontawesome.com/v5/icons/) from Fonticons, Inc. (v5.15.3 offering *1598* free and *7848* pro icons)
- [`FontAwesome 6`](https://fontawesome.com) designed by Fonticons, Inc. (v6.1.2 featuring *2016* free and *16150* pro icons)
- [`Fontisto`](https://github.com/kenangundogan/fontisto) created by Kenan Gündoğan (v3.0.4 featuring *615* icons)
- [`Foundation`](http://zurb.com/playground/foundation-icon-fonts-3) by ZURB, Inc. (v3.0 with *283* icons)
- [`Ionicons`](https://ionicons.com/) crafted by Ionic (v7.1.0 containing *1338* icons)
- [`MaterialIcons`](https://fonts.google.com/icons/) by Google, Inc. (v4.0.0 featuring *2189* icons)
- [`MaterialCommunityIcons`](https://materialdesignicons.com/) from MaterialDesignIcons.com (v6.5.95 including *6596* icons)
- [`Octicons`](http://octicons.github.com) designed by Github, Inc. (v16.3.1 with *250* icons)
- [`Zocial`](http://zocial.smcllns.com/) by Sam Collins (v1.4.0 with *100* icons)
- [`SimpleLineIcons`](https://simplelineicons.github.io/) crafted by Sabbir & Contributors (v2.5.5 with *189* icons)
## Installation
1. Run: `$ npm install --save react-native-vector-icons`
2. For each platform (iOS/Android/Windows) you plan to use, follow one of the options for the corresponding platform.
3. Check out these guides if you intend to use FontAwesome 5 or 6 to get you started: [`FontAwesome 5`](FONTAWESOME5.md) [`FontAwesome 6`](FONTAWESOME6.md)
1. Install the package via npm:
```sh
npm install --save react-native-vector-icons
```
2. Depending on the platform you're targeting (iOS/Android/Windows), follow the appropriate setup instructions.
3. If you're planning to use FontAwesome 5 or 6 icons, refer to these guides: [FontAwesome 5](FONTAWESOME5.md) | [FontAwesome 6](FONTAWESOME6.md)
### iOS
### iOS Setup
To use the bundled icons on iOS, follow these steps:
If you want to use any of the bundled icons, you need to add the icon fonts to your Xcode project. Just follow these steps:
- Navigate to `node_modules/react-native-vector-icons` and drag the `Fonts` folder (or select specific fonts) into your Xcode project.
- Make sure your app is checked under "Add to targets," and if adding the whole folder, check "Create groups."
- Not familiar with Xcode? Check out this [article](https://medium.com/@vimniky/how-to-use-vector-icons-in-your-react-native-project-8212ac6a8f06).
- Browse to `node_modules/react-native-vector-icons` and drag the folder `Fonts` (or just the ones you want) to your project in Xcode. **Make sure your app is checked under "Add to targets" and that "Create groups" is checked if you add the whole folder**. Not familiar with Xcode? Try [this article](https://medium.com/@vimniky/how-to-use-vector-icons-in-your-react-native-project-8212ac6a8f06)
- Edit `Info.plist` and add a property called **Fonts provided by application** (or `UIAppFonts` if Xcode won't autocomplete/not using Xcode) and type in the files you just added. It will look something like this:
- Edit `Info.plist` and add a property called **Fonts provided by application** (or **UIAppFonts** if Xcode autocomplete is not working):
- <details><summary>List of all available fonts to copy & paste in Info.plist</summary>
```xml
<key>UIAppFonts</key>
<array>
<string>AntDesign.ttf</string>
<string>Entypo.ttf</string>
<string>EvilIcons.ttf</string>
<string>Feather.ttf</string>
<string>FontAwesome.ttf</string>
<string>FontAwesome5_Brands.ttf</string>
<string>FontAwesome5_Regular.ttf</string>
<string>FontAwesome5_Solid.ttf</string>
<string>FontAwesome6_Brands.ttf</string>
<string>FontAwesome6_Regular.ttf</string>
<string>FontAwesome6_Solid.ttf</string>
<string>Foundation.ttf</string>
<string>Ionicons.ttf</string>
<string>MaterialIcons.ttf</string>
<string>MaterialCommunityIcons.ttf</string>
<string>SimpleLineIcons.ttf</string>
<string>Octicons.ttf</string>
<string>Zocial.ttf</string>
<string>Fontisto.ttf</string>
</array>
```
</details>
![XCode screenshot](https://cloud.githubusercontent.com/assets/378279/12421498/2db1f93a-be88-11e5-89c8-2e563ba6251a.png)
Above step might look something like this:
<details><summary>List of all available fonts to copy & paste in Info.plist</summary>
```xml
<key>UIAppFonts</key>
<array>
<string>AntDesign.ttf</string>
<string>Entypo.ttf</string>
<string>EvilIcons.ttf</string>
<string>Feather.ttf</string>
<string>FontAwesome.ttf</string>
<string>FontAwesome5_Brands.ttf</string>
<string>FontAwesome5_Regular.ttf</string>
<string>FontAwesome5_Solid.ttf</string>
<string>FontAwesome6_Brands.ttf</string>
<string>FontAwesome6_Regular.ttf</string>
<string>FontAwesome6_Solid.ttf</string>
<string>Foundation.ttf</string>
<string>Ionicons.ttf</string>
<string>MaterialIcons.ttf</string>
<string>MaterialCommunityIcons.ttf</string>
<string>SimpleLineIcons.ttf</string>
<string>Octicons.ttf</string>
<string>Zocial.ttf</string>
<string>Fontisto.ttf</string>
</array>
```
</details>
![XCode screenshot](https://cloud.githubusercontent.com/assets/378279/12421498/2db1f93a-be88-11e5-89c8-2e563ba6251a.png)
- In your XCode Settings, in the **Build Phases** tab, under **Copy Bundle Resources** add the fonts you have copied in the `Fonts` directory.
- In Xcode, select your project in the navigator, choose your app's target, go to the **Build Phases** tab, and under **Copy Bundle Resources**, add the copied fonts.
- When using auto linking, it will automatically add all fonts to the **Build Phases**, **Copy Pods Resources**. Which will end up in your bundle.
To avoid that, create a `react-native.config.js` file at the root of your react-native project with:
```js
module.exports = {
dependencies: {
'react-native-vector-icons': {
platforms: {
ios: null,
```javascript
module.exports = {
dependencies: {
'react-native-vector-icons': {
platforms: {
ios: null,
},
},
},
},
},
};
```
};
```
<br>
_Note: Recompile your project after adding new fonts._
_Note: you need to recompile your project after adding new fonts._
### Android Setup
### Android
#### Option: With Gradle (recommended)
This method has the advantage of fonts being copied from this module at build time so that the fonts and JS are always in sync, making upgrades painless.
To make font management smoother on Android, use this method:
Edit `android/app/build.gradle` ( NOT `android/build.gradle` ) and add the following:
- Edit `android/app/build.gradle` (NOT `android/build.gradle`) and add:
```gradle
apply from: file("../../node_modules/react-native-vector-icons/fonts.gradle")
```
```gradle
apply from: file("../../node_modules/react-native-vector-icons/fonts.gradle")
```
To customize the files being copied, add the following instead:
To customize the fonts being copied, use:
```gradle
project.ext.vectoricons = [
iconFontNames: [ 'MaterialIcons.ttf', 'EvilIcons.ttf' ] // Name of the font files you want to copy
]
```gradle
project.ext.vectoricons = {
iconFontNames: [ 'MaterialIcons.ttf', 'EvilIcons.ttf' ] // Specify font files
}
apply from: file("../../node_modules/react-native-vector-icons/fonts.gradle");
```
apply from: file("../../node_modules/react-native-vector-icons/fonts.gradle")
```
<details>

@@ -150,5 +157,4 @@ <summary>Monorepo configuration</summary>

<br>
If you are working in a monorepo, you'll need to point to the correct location of the `fonts.gradle` script and of the Font files, **relative to the android/app/build.gradle file**. For example if your repo uses this common structure:
If working in a monorepo, point to the correct paths of the `fonts.gradle` script and of the Font files, relative to the android/app/build.gradle file. Example structure:
```text

@@ -165,3 +171,3 @@ your-monorepo/

you will need to update the paths to:
Update paths like:

@@ -171,3 +177,3 @@ ```diff

+ iconFontsDir: "../../../../node_modules/react-native-vector-icons/Fonts",
iconFontNames: ["WhateverFonts", "..."]
iconFontNames: ["YourFont.ttf", "..."]
]

@@ -179,117 +185,138 @@

⚠️ There have been [reported issues](https://github.com/oblador/react-native-vector-icons/issues/1281#issuecomment-1363201537) when using RNVI < 9.0.0 in a monorepo, so make sure you are on 9+.
⚠️ Reported [issues](https://github.com/oblador/react-native-vector-icons/issues/1281#issuecomment-1363201537) have arisen when utilizing RNVI versions earlier than 9.0.0 within a monorepo context. Therefore, it's advisable to ensure your RNVI version is 9.0.0 or later.
</details>
#### Option: Manually
#### Option: Manual Integration
- Copy the contents in the `Fonts` folder to `android/app/src/main/assets/fonts` (_note lowercase fonts folder_).
To manually integrate the library, follow these steps:
##### Integrating library for `getImageSource` support
- Copy the contents from the `Fonts` folder and paste them into `android/app/src/main/assets/fonts` (ensure the folder name is lowercase, i.e., `fonts`).
These steps are optional and only needed if you want to use the `Icon.getImageSource` function.
#### Integrating Library for `getImageSource` Support
- Edit `android/settings.gradle` to look like this (without the +):
The following steps are optional and are only necessary if you intend to utilize the `Icon.getImageSource` function.
```diff
rootProject.name = 'MyApp'
- Edit the `android/settings.gradle` file as shown below:
include ':app'
```diff
rootProject.name = 'MyApp'
+ include ':react-native-vector-icons'
+ project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
```
include ':app'
- Edit `android/app/build.gradle` (note: **app** folder) to look like this:
+ include ':react-native-vector-icons'
+ project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
```
```diff
apply plugin: 'com.android.application'
- Edit the `android/app/build.gradle` (located in the **app** folder) as shown below:
android {
...
}
```diff
apply plugin: 'com.android.application'
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+" // From node_modules
android {
...
}
+ implementation project(':react-native-vector-icons')
}
```
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+" // From node_modules
- Edit your `MainApplication.java` (deep in `android/app/src/main/java/...`) to look like this (note **two** places to edit):
- Note: this is optional step, it's necessary only and only if your **react-native app doesn't support auto-linking** otherwise you can ignore this.
+ implementation project(':react-native-vector-icons')
}
```
```diff
package com.myapp;
- Edit your `MainApplication.java` (located deep within `android/app/src/main/java/...`) as shown below (note that there are `two` places to edit):
+ import com.oblador.vectoricons.VectorIconsPackage;
```diff
package com.myapp;
....
+ import com.oblador.vectoricons.VectorIconsPackage;
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage()
+ , new VectorIconsPackage()
);
}
....
}
```
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage()
+ , new VectorIconsPackage()
);
}
```
### macOS via [`react-native-macos`](https://github.com/microsoft/react-native-macos)
Please note that this optional step is necessary only if your **react-native app doesn't support auto-linking**; otherwise, you can skip this.
- Browse to `node_modules/react-native-vector-icons` and drag the folder `Fonts` to your project in Xcode. **Make sure your app is checked under "Add to targets" and that "Create folder references" is checked**.
- Edit `Info.plist` and add a property called **Application fonts resource path** (or `ATSApplicationFontsPath` if Xcode won't autocomplete/not using Xcode) and type `Fonts` as the value.
### macOS Setup
via [`react-native-macos`](https://github.com/microsoft/react-native-macos)
_Note: you need to recompile your project after adding new fonts, also ensure that the `Fonts` folder also appear under **Copy Bundle Resources** in **Build Phases**._
To set up the library on your macOS project using `react-native-macos`, follow these steps:
### Windows via [`react-native-windows`](https://github.com/microsoft/react-native-windows)
1. Browse to the `node_modules/react-native-vector-icons` folder and drag the `Fonts` folder into your project in Xcode. Ensure that your app is checked under "Add to targets," and select "Create folder references" when prompted.
- In the top level projects (/windows/project-name/Assets), copy and paste the font files.
- Open your solution in Visual Studio, right click the Assets folder in your solution, click **Add > Existing Item**.
- Select the fonts that were into /windows/project-name/assets and click **Add**.
2. Edit your `Info.plist` and include a new property named **Application fonts resource path** (or `ATSApplicationFontsPath` if Xcode's autocomplete isn't functioning or you're not using Xcode). Set the value of this property to `Fonts`.
_Note: you need to recompile your project after adding new fonts._
_Please note that after adding new fonts, you need to recompile your project. Also, make sure that the `Fonts` folder is present under the **Copy Bundle Resources** section within the **Build Phases** of your Xcode project._
### Web (with [webpack](https://webpack.js.org/))
These steps will effectively integrate the vector icons library into your macOS project while utilizing the `react-native-macos` framework.
In your webpack configuration file, add a section to handle ttf files using url-loader (or file-loader)
### Windows Setup
via [`react-native-windows`](https://github.com/microsoft/react-native-windows)
```js
{
test: /\.ttf$/,
loader: "url-loader", // or directly file-loader
include: path.resolve(__dirname, "node_modules/react-native-vector-icons"),
},
```
To set up the library on your Windows project using `react-native-windows`, follow these steps:
Then consume those files in your JavaScript entry point to get the bundled url and inject a style tag in your page:
1. In the top-level projects (`/windows/project-name/Assets`), copy and paste the font files.
```js
// Use prebuilt version of RNVI in dist folder
import Icon from 'react-native-vector-icons/dist/FontAwesome';
2. Open your solution in Visual Studio:
// Generate required css
import iconFont from 'react-native-vector-icons/Fonts/FontAwesome.ttf';
const iconFontStyles = `@font-face {
src: url(${iconFont});
font-family: FontAwesome;
}`;
a. Right-click the Assets folder in your solution.
b. Select **Add > Existing Item**.
c. Browse and select the fonts that you copied into `/windows/project-name/assets`.
d. Click **Add**.
// Create stylesheet
const style = document.createElement('style');
style.type = 'text/css';
if (style.styleSheet) {
style.styleSheet.cssText = iconFontStyles;
} else {
style.appendChild(document.createTextNode(iconFontStyles));
}
_Please note that after adding new fonts, you need to recompile your project._
// Inject stylesheet
document.head.appendChild(style);
```
By following these steps, you'll seamlessly integrate the vector icons library into your Windows project, leveraging the `react-native-windows` framework.
### Web Setup
To integrate the library with your web project using [webpack](https://webpack.js.org/), follow these steps:
1. In your webpack configuration file, add a section to handle TTF files using `url-loader` or `file-loader`:
```js
{
test: /\.ttf$/,
loader: "url-loader", // or directly file-loader
include: path.resolve(__dirname, "node_modules/react-native-vector-icons"),
}
```
2. In your JavaScript entry point, consume the font files and inject the necessary style tag:
```js
// Use the prebuilt version of RNVI located in the dist folder
import Icon from 'react-native-vector-icons/dist/FontAwesome';
// Generate the required CSS
import iconFont from 'react-native-vector-icons/Fonts/FontAwesome.ttf';
const iconFontStyles = `@font-face {
src: url(${iconFont});
font-family: FontAwesome;
}`;
// Create a stylesheet
const style = document.createElement('style');
style.type = 'text/css';
// Append the iconFontStyles to the stylesheet
if (style.styleSheet) {
style.styleSheet.cssText = iconFontStyles;
} else {
style.appendChild(document.createTextNode(iconFontStyles));
}
// Inject the stylesheet into the document head
document.head.appendChild(style);
```
By following these steps, you will seamlessly integrate the vector icons library into your web project using [webpack](https://webpack.js.org/), enabling you to effortlessly use the icons within your web application.
## Upgrading

@@ -388,3 +415,3 @@

## Usage as PNG image/source object
## Usage as PNG Image/Source Object

@@ -401,3 +428,3 @@ Convenient way to plug this in into other components that rely on bitmap images rather than scalable vector icons. Takes the arguments `name`, `size` and `color` as described above.

# Multi-style fonts
## Multi-Style Fonts

@@ -566,3 +593,3 @@ Some fonts today use multiple styles, FontAwesome 5 for example, which is supported by this library. The usage is pretty much the same as the standard `Icon` component:

## Examples
## Usage Examples

@@ -585,3 +612,3 @@ ### IconExplorer

### TabBar
## TabBar

@@ -695,3 +722,3 @@ Since [`TabBarIOS`](https://reactnative.dev/docs/tabbarios.html) was removed from core in favor of [@react-navigation/bottom-tabs](https://reactnative.dev/docs/tabbarios.html), it is also removed as a convenience component from this library. Simply use the `Icon` instead, but don't forget to import and link to this project as described above first.

## Generating your own icon set from a CSS file
## Generating Your Own Icon Set from a CSS File

@@ -758,2 +785,2 @@ If you already have an icon font with associated CSS file then you can easily generate a icon set with the `generate-icon` script.

Any bundled fonts are copyright to their respective authors and mostly under MIT or [SIL OFL](http://scripts.sil.org/OFL).
Any bundled fonts are copyright to their respective authors and mostly under MIT or [SIL OFL](http://scripts.sil.org/OFL).

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc