react-native-vector-icons
Advanced tools
Comparing version 0.6.4 to 0.6.5
@@ -10,2 +10,3 @@ 'use strict'; | ||
TextInput, | ||
TouchableHighlight, | ||
} = React; | ||
@@ -27,5 +28,7 @@ | ||
<View style={styles.container}> | ||
<Icon name={this.props.name} style={[styles.icon, style]}> | ||
<Text style={[styles.text, style]}>{this.props.children}</Text> | ||
</Icon> | ||
<TouchableHighlight style={styles.touchable}> | ||
<Icon name={this.props.name} style={[styles.icon, style]}> | ||
<Text style={[styles.text, style]}>{this.props.children}</Text> | ||
</Icon> | ||
</TouchableHighlight> | ||
</View> | ||
@@ -43,2 +46,6 @@ </View> | ||
}, | ||
touchable: { | ||
borderRadius: 4, | ||
overflow: 'hidden', | ||
}, | ||
icon: { | ||
@@ -49,3 +56,2 @@ fontSize: 20, | ||
color: 'white', | ||
borderRadius: 4, | ||
backgroundColor: '#999', | ||
@@ -52,0 +58,0 @@ }, |
@@ -17,7 +17,5 @@ /** | ||
var RNVectorIconsManager = NativeModules.RNVectorIconsManager; | ||
var invariant = require('invariant'); | ||
var merge = require('merge'); | ||
var flattenStyle = require('flattenStyle'); | ||
var ViewStylePropTypes = require('ViewStylePropTypes'); | ||
var TextStylePropTypes = require('TextStylePropTypes'); | ||
var flattenStyle = require('react-native/Libraries/StyleSheet/flattenStyle'); | ||
var ViewStylePropTypes = require('react-native/Libraries/Components/View/ViewStylePropTypes'); | ||
var TextStylePropTypes = require('react-native/Libraries/Text/TextStylePropTypes'); | ||
@@ -53,2 +51,7 @@ var DEFAULT_ICON_SIZE = 12; | ||
}, | ||
setNativeProps(nativeProps) { | ||
this._root.setNativeProps(nativeProps); | ||
}, | ||
render: function() { | ||
@@ -78,3 +81,3 @@ | ||
return ( | ||
<View {...this.props} style={containerStyle}> | ||
<View ref={component => this._root = component} {...this.props} style={containerStyle}> | ||
<Text style={textStyle}>{glyph}</Text> | ||
@@ -90,3 +93,5 @@ {this.props.children} | ||
var getImageSource = function(name : string, size? : number, color? : string) : Promise { | ||
invariant(RNVectorIconsManager, 'RNVectorIconsManager not available, did you add the library to your project and link with libRNVectorIcons.a?'); | ||
if(!RNVectorIconsManager) { | ||
throw new Error('RNVectorIconsManager not available, did you add the library to your project and link with libRNVectorIcons.a?'); | ||
} | ||
@@ -93,0 +98,0 @@ var glyph = glyphMap[name] || '?'; |
{ | ||
"name": "react-native-vector-icons", | ||
"version": "0.6.4", | ||
"version": "0.6.5", | ||
"description": "Customizable Icons for React Native with support for NavBar/TabBar, image source and full styling. Choose from 2800+ bundled icons or use your own.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -194,2 +194,6 @@ # Vector Icons for React Native | ||
### Community examples | ||
* [react-native-dribbble-app](https://github.com/catalinmiron/react-native-dribbble-app) | ||
## Generating your own icon set from a CSS file | ||
@@ -196,0 +200,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
838488
3939
228