Socket
Socket
Sign inDemoInstall

react-native-vector-icons

Package Overview
Dependencies
Maintainers
1
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-vector-icons - npm Package Compare versions

Comparing version 2.0.3 to 2.1.0

2

lib/generate-icon-set-from-css.js

@@ -9,3 +9,3 @@ /**

function extractGlyphMapFromCss(files, selectorPattern) {
var styleRulePattern = '(\\.[A-Za-z0-9_.:, \\n\\t-]+)\\{[^}]*content: ?["\\\']\\\\([a-f0-9]+)["\\\'][^}]*\\}';
var styleRulePattern = '(\\.[A-Za-z0-9_.:, \\n\\t-]+)\\{[^}]*content: ?["\\\']\\\\([A-Fa-f0-9]+)["\\\'][^}]*\\}';
var allStyleRules = new RegExp(styleRulePattern, 'g');

@@ -12,0 +12,0 @@ var singleStyleRules = new RegExp(styleRulePattern);

@@ -19,2 +19,4 @@ import isEqual from 'lodash/isEqual';

iconSize: PropTypes.number,
iconColor: PropTypes.string,
selectedIconColor: PropTypes.string,
};

@@ -28,6 +30,8 @@

if (props.iconName) {
getImageSource(props.iconName, props.iconSize).then(icon => this.setState({ icon }));
getImageSource(props.iconName, props.iconSize, props.iconColor).then(icon => this.setState({ icon }));
}
if (props.selectedIconName) {
getImageSource(props.selectedIconName, props.iconSize).then(selectedIcon => this.setState({ selectedIcon }));
if (props.selectedIconName || props.selectedIconColor) {
const selectedIconName = props.selectedIconName || props.iconName;
const selectedIconColor = props.selectedIconColor || props.iconColor;
getImageSource(selectedIconName, props.iconSize, selectedIconColor).then(selectedIcon => this.setState({ selectedIcon }));
}

@@ -34,0 +38,0 @@ }

{
"name": "react-native-vector-icons",
"version": "2.0.3",
"version": "2.1.0",
"description": "Customizable Icons for React Native with support for NavBar/TabBar, image source and full styling. Choose from 3000+ bundled icons or use your own.",

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

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

#### Option: With [`rnpm`](https://github.com/rnpm/rnpm)
`$ rnpm link`
#### Option: Manually

@@ -63,4 +59,2 @@

### Android
#### Option: With [`rnpm`](https://github.com/rnpm/rnpm)

@@ -70,6 +64,12 @@

#### Option: With Gradle
*Note: Some users are having trouble using this method, try one of the others if you are too.*
Edit `android/app/build.gradle` and add the following:
### 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.
Edit `android/app/build.gradle` ( NOT `android/build.gradle` ) and add the following:
```gradle

@@ -125,3 +125,3 @@ apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"

* Edit your `MainActivity.java` (deep in `android/app/src/main/java/...`) to look like this (note **two** places to edit):
* Edit your `MainApplication.java` (deep in `android/app/src/main/java/...`) to look like this (note **two** places to edit):

@@ -148,2 +148,8 @@ ```diff

#### Option: With [`rnpm`](https://github.com/rnpm/rnpm)
`$ rnpm link`
*Note: Some users are having trouble using this method, try one of the others if you are too.*
### OSX via [`react-native-desktop`](https://github.com/ptmt/react-native-desktop)

@@ -243,5 +249,9 @@

|**`iconSize`**|Size of the icon. |`30`|
|**`iconColor`**|Color of the icon. |*None*|
|**`selectedIconColor`**|Color of the selected icon. |*`iconColor`*|
For example usage see `Examples/TabBarExample` or the examples section below. Don't forget to import and link to this project as described above if you are going to use the TabBar integration.
**Note:** using `iconColor` and `selectedIconColor` requires the attribute [renderAsOriginal](https://facebook.github.io/react-native/docs/tabbarios-item.html#renderasoriginal) to be set to `true` on `Icon.TabBarItemIOS`.
## Usage with [NavigatorIOS](http://facebook.github.io/react-native/docs/navigatorios.html)

@@ -308,2 +318,4 @@

Make sure you're using the _Download_ option in IcoMoon, and use the `.json` file that's included in the `.zip` you've downloaded. You'll also need to import the `.ttf` font file into your project, following the instructions above.
## Animation

@@ -310,0 +322,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc