Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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 1.0.4 to 1.1.0

lib/create-icon-set-from-icomoon.js

2

index.js

@@ -5,2 +5,3 @@ 'use strict';

var createIconSetFromFontello = require('./lib/create-icon-set-from-fontello');
var createIconSetFromIcoMoon = require('./lib/create-icon-set-from-icomoon');

@@ -10,2 +11,3 @@ module.exports = {

createIconSetFromFontello,
createIconSetFromIcoMoon
};

22

lib/create-icon-set.js

@@ -7,6 +7,6 @@ /**

var pick = require('lodash/object/pick');
var omit = require('lodash/object/omit');
var isString = require('lodash/lang/isString');
var isEqual = require('lodash/lang/isEqual');
var pick = require('lodash/pick');
var omit = require('lodash/omit');
var isString = require('lodash/isString');
var isEqual = require('lodash/isEqual');

@@ -205,9 +205,9 @@ var React = require('react-native');

updateIconSources: function() {
updateIconSources: function(props) {
var size = this.props.iconSize || TAB_BAR_ICON_SIZE;
if(this.props.iconName) {
getImageSource(this.props.iconName, size).then(icon => this.setState({ icon }));
if(props.iconName) {
getImageSource(props.iconName, size).then(icon => this.setState({ icon }));
}
if(this.props.selectedIconName) {
getImageSource(this.props.selectedIconName, size).then(selectedIcon => this.setState({ selectedIcon }));
if(props.selectedIconName) {
getImageSource(props.selectedIconName, size).then(selectedIcon => this.setState({ selectedIcon }));
}

@@ -217,3 +217,3 @@ },

componentWillMount: function() {
this.updateIconSources();
this.updateIconSources(this.props);
},

@@ -224,3 +224,3 @@

if(!isEqual(pick(nextProps, keys), pick(this.props, keys))) {
this.updateIconSources();
this.updateIconSources(nextProps);
}

@@ -227,0 +227,0 @@ },

{
"name": "react-native-vector-icons",
"version": "1.0.4",
"version": "1.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.",

@@ -53,3 +53,3 @@ "main": "index.js",

"dependencies": {
"lodash": "^3.8.0",
"lodash": "^4.0.0",
"yargs": "^3.31.0"

@@ -56,0 +56,0 @@ },

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

![XCode screenshot](https://cloud.githubusercontent.com/assets/378279/7667535/0e1fd13a-fc0c-11e4-9220-18d5c095a7be.png)
![XCode screenshot](https://cloud.githubusercontent.com/assets/378279/12421498/2db1f93a-be88-11e5-89c8-2e563ba6251a.png)

@@ -109,30 +109,14 @@ *Note: you need to recompile your project after adding new fonts, also ensure that they also appear under __Copy Bundle Resources__ in __Build Phases__.*

public class MainActivity extends Activity implements DefaultHardwareBackBtnHandler {
private ReactInstanceManager mReactInstanceManager;
private ReactRootView mReactRootView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mReactRootView = new ReactRootView(this);
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage()
+ , new VectorIconsPackage()
);
}
mReactInstanceManager = ReactInstanceManager.builder()
.setApplication(getApplication())
.setBundleAssetName("index.android.bundle")
.setJSMainModuleName("index.android")
.addPackage(new MainReactPackage())
+ .addPackage(new VectorIconsPackage())
.setUseDeveloperSupport(BuildConfig.DEBUG)
.setInitialLifecycleState(LifecycleState.RESUMED)
.build();
mReactRootView.startReactApplication(mReactInstanceManager, "MyApp", null);
setContentView(mReactRootView);
}
...
}
```
*Note: If you're using React Native (Android) <= 0.17, [follow this instructions](https://github.com/oblador/react-native-vector-icons/blob/2fe5b97afa849652215e3258189e8ca3ea775c53/README.md#integrating-library-for-getimagesource-support)*

@@ -267,2 +251,10 @@ ## `Icon` Component

### `createIconSetFromIcoMoon(config[, fontFamily[, fontFile]])`
```js
var { createIconSetFromIcoMoon } = require('react-native-vector-icons');
var icoMoonConfig = require('./config.json');
var Icon = createIconSetFromIcoMoon(icoMoonConfig);
```
## Examples

@@ -269,0 +261,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