Socket
Socket
Sign inDemoInstall

expo-vector-icons

Package Overview
Dependencies
103
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 9.0.0 to 10.0.0

babel.config.build.js

6

AntDesign.js

@@ -1,4 +0,2 @@

import glyphMap from './vendor/react-native-vector-icons/glyphmaps/AntDesign.json';
import createIconSet from './createIconSet';
export default createIconSet(glyphMap, 'anticon', require('./fonts/AntDesign.ttf'));
import AntDesign from './build/AntDesign';
export default AntDesign;

@@ -1,65 +0,2 @@

import React from 'react';
import { Text } from 'react-native';
import * as Font from 'expo-font';
import createIconSet from './vendor/react-native-vector-icons/lib/create-icon-set';
import createIconButtonComponent from './vendor/react-native-vector-icons/lib/icon-button';
export default function(glyphMap, fontName, expoAssetId) {
const font = { [fontName]: expoAssetId };
const RNVIconComponent = createIconSet(glyphMap, fontName);
class Icon extends React.Component {
static propTypes = RNVIconComponent.propTypes;
static defaultProps = RNVIconComponent.defaultProps;
state = {
fontIsLoaded: Font.isLoaded(fontName),
};
async componentWillMount() {
this._mounted = true;
if (!this.state.fontIsLoaded) {
await Font.loadAsync(font);
this._mounted && this.setState({ fontIsLoaded: true });
}
}
componentWillUnmount() {
this._mounted = false;
}
setNativeProps(props) {
if (this._icon) {
this._icon.setNativeProps(props);
}
}
render() {
if (!this.state.fontIsLoaded) {
return <Text />;
}
return (
<RNVIconComponent
ref={view => {
this._icon = view;
}}
{...this.props}
/>
);
}
}
function getRawGlyphMap() {
return glyphMap;
}
Icon.Button = createIconButtonComponent(Icon);
Icon.glyphMap = glyphMap;
Icon.getRawGlyphMap = getRawGlyphMap;
Icon.getFontFamily = () => fontName;
Icon.loadFont = () => Font.loadAsync(font);
Icon.font = font;
return Icon;
}
import createIconSet from './build/createIconSet';
export default createIconSet;

@@ -1,5 +0,2 @@

import createIconSetFromFontello from './vendor/react-native-vector-icons/lib/create-icon-set-from-fontello';
export default function(config, expoFontName, expoAssetId) {
return createIconSetFromFontello(config, expoFontName, expoAssetId);
}
import createIconSetFromFontello from './build/createIconSetFromFontello';
export default createIconSetFromFontello;

@@ -1,5 +0,2 @@

import createIconSetFromIcoMoon from './vendor/react-native-vector-icons/lib/create-icon-set-from-icomoon';
export default function(config, expoFontName, expoAssetId) {
return createIconSetFromIcoMoon(config, expoFontName, expoAssetId);
}
import createIconSetFromIcoMoon from './build/createIconSetFromIcoMoon';
export default createIconSetFromIcoMoon;

@@ -1,4 +0,2 @@

import glyphMap from './vendor/react-native-vector-icons/glyphmaps/Entypo.json';
import createIconSet from './createIconSet';
export default createIconSet(glyphMap, 'entypo', require('./fonts/Entypo.ttf'));
import Entypo from './build/Entypo';
export default Entypo;

@@ -1,4 +0,2 @@

import glyphMap from './vendor/react-native-vector-icons/glyphmaps/EvilIcons.json';
import createIconSet from './createIconSet';
export default createIconSet(glyphMap, 'evilicons', require('./fonts/EvilIcons.ttf'));
import EvilIcons from './build/EvilIcons';
export default EvilIcons;

@@ -1,4 +0,2 @@

import glyphMap from './vendor/react-native-vector-icons/glyphmaps/Feather.json';
import createIconSet from './createIconSet';
export default createIconSet(glyphMap, 'feather', require('./fonts/Feather.ttf'));
import Feather from './build/Feather';
export default Feather;

@@ -1,4 +0,2 @@

import glyphMap from './vendor/react-native-vector-icons/glyphmaps/FontAwesome.json';
import createIconSet from './createIconSet';
export default createIconSet(glyphMap, 'FontAwesome', require('./fonts/FontAwesome.ttf'));
import FontAwesome from './build/FontAwesome';
export default FontAwesome;

@@ -1,13 +0,2 @@

import React from 'react';
export default class FontAwesome5 extends React.Component {
componentDidMount() {
console.warn(
'FontAwesome5 is not supported by @expo/vector-icons: https://github.com/expo/vector-icons/issues/77'
);
}
render() {
return null;
}
}
import FontAwesome5 from './build/FontAwesome5';
export default FontAwesome5;

@@ -1,4 +0,2 @@

import glyphMap from './vendor/react-native-vector-icons/glyphmaps/Foundation.json';
import createIconSet from './createIconSet';
export default createIconSet(glyphMap, 'foundation', require('./fonts/Foundation.ttf'));
import Foundation from './build/Foundation';
export default Foundation;

@@ -1,4 +0,2 @@

import glyphMap from './vendor/react-native-vector-icons/glyphmaps/Ionicons.json';
import createIconSet from './createIconSet';
export default createIconSet(glyphMap, 'ionicons', require('./fonts/Ionicons.ttf'));
import Ionicons from './build/Ionicons';
export default Ionicons;

@@ -1,8 +0,2 @@

import glyphMap from './vendor/react-native-vector-icons/glyphmaps/MaterialCommunityIcons.json';
import createIconSet from './createIconSet';
export default createIconSet(
glyphMap,
'material-community',
require('./fonts/MaterialCommunityIcons.ttf')
);
import MaterialCommunityIcons from './build/MaterialCommunityIcons';
export default MaterialCommunityIcons;

@@ -1,4 +0,2 @@

import glyphMap from './vendor/react-native-vector-icons/glyphmaps/MaterialIcons.json';
import createIconSet from './createIconSet';
export default createIconSet(glyphMap, 'material', require('./fonts/MaterialIcons.ttf'));
import MaterialIcons from './build/MaterialIcons';
export default MaterialIcons;

@@ -1,4 +0,2 @@

import glyphMap from './vendor/react-native-vector-icons/glyphmaps/Octicons.json';
import createIconSet from './createIconSet';
export default createIconSet(glyphMap, 'octicons', require('./fonts/Octicons.ttf'));
import Octicons from './build/Octicons';
export default Octicons;
{
"name": "expo-vector-icons",
"version": "9.0.0",
"sideEffects": false,
"version": "10.0.0",
"description": "Built-in support for 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.",
"main": "index.js",
"scripts": {},
"main": "build/IconsLazy.js",
"module": "build/Icons.js",
"types": "build/Icons.d.ts",
"scripts": {
"copy-vendor": "cp -R src/vendor/ build/vendor/",
"generate-lazy": "expo-module babel --config-file ./babel.config.build.js --source-maps --out-file build/IconsLazy.js build/Icons.js",
"build": "EXPO_NONINTERACTIVE=1 expo-module build && npm run generate-lazy && npm run copy-vendor",
"build:dev": "expo-module build",
"clean": "expo-module clean",
"lint": "eslint tools",
"test": "expo-module test",
"prepare": "expo-module prepare && npm run generate-lazy && npm run copy-vendor",
"prepublishOnly": "expo-module prepublishOnly",
"expo-module": "expo-module"
},
"repository": {

@@ -15,2 +29,5 @@ "type": "git",

"author": "Brent Vatne",
"contributors": [
"Evan Bacon <bacon@expo.io> (https://github.com/evanbacon)"
],
"license": "MIT",

@@ -20,8 +37,17 @@ "bugs": {

},
"jest": {
"preset": "expo-module-scripts"
},
"homepage": "https://expo.github.io/vector-icons",
"unimodulePeerDependencies": {
"expo-font": "*"
},
"dependencies": {
"lodash": "^4.17.4",
"react-native-vector-icons": "6.0.0"
"lodash": "^4.17.4"
},
"devDependencies": {}
"devDependencies": {
"@types/react-native": "~0.57",
"expo-font": "^3.0.1",
"expo-module-scripts": "^1.0.0"
}
}

@@ -12,8 +12,10 @@ # @expo/vector-icons

- [@expo/vector-icons directory](https://expo.github.io/vector-icons/) - a searchable list of all included icons.
![Screenshot of website](https://raw.githubusercontent.com/expo/vector-icons/master/website-screenshot.png)
![Screenshot of website](https://raw.githubusercontent.com/expo/vector-icons/master/website-screenshot.png)
- [Expo documentation](https://docs.expo.io/)
## Usage
This library is part of the `expo` package, so if you are using `expo` you can simply use it like so
```es
```tsx
import React from 'react';

@@ -24,8 +26,7 @@ import { Ionicons } from '@expo/vector-icons';

render() {
return (
<Ionicons name="md-checkmark-circle" size={32} color="green" />
);
return <Ionicons name="md-checkmark-circle" size={32} color="green" />;
}
}
```
for more usage see [Expo icons documentation](https://docs.expo.io/versions/latest/guides/icons.html)

@@ -1,4 +0,2 @@

import glyphMap from './vendor/react-native-vector-icons/glyphmaps/SimpleLineIcons.json';
import createIconSet from './createIconSet';
export default createIconSet(glyphMap, 'simple-line-icons', require('./fonts/SimpleLineIcons.ttf'));
import SimpleLineIcons from './build/SimpleLineIcons';
export default SimpleLineIcons;

@@ -1,4 +0,2 @@

import glyphMap from './vendor/react-native-vector-icons/glyphmaps/Zocial.json';
import createIconSet from './createIconSet';
export default createIconSet(glyphMap, 'zocial', require('./fonts/Zocial.ttf'));
import Zocial from './build/Zocial';
export default Zocial;

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 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 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