Skip to content

Commit

Permalink
Fixes for error when inside TouchableHighlight. Removing peer dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
corymsmith committed Aug 6, 2015
1 parent 2f904c9 commit 09b78e7
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
17 changes: 11 additions & 6 deletions Example/index.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ var {
Text,
View,
ScrollView,
TouchableHighlight
//Animated
} = React;

Expand Down Expand Up @@ -102,12 +103,16 @@ var Example = React.createClass({
return (
<ScrollView contentContainerStyle={styles.container}>
<View style={styles.topContainer}>
<Icon
name='ion|beer'
size={40}
color='#887700'
style={styles.beer}
/>
<TouchableHighlight
underlayColor="transparent"
onPress={() => alert('Beer!')}>
<Icon
name='ion|beer'
size={40}
color='#887700'
style={styles.beer}
/>
</TouchableHighlight>
<Icon
name='material|face'
size={40}
Expand Down
2 changes: 1 addition & 1 deletion SMXIconImage.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ var SMXIconImage = React.createClass({
color: color
};

return <SMXIconImageView {...nativeProps} />;
return <SMXIconImageView {...nativeProps} ref={ICON_REF} />;
}
});

Expand Down
4 changes: 1 addition & 3 deletions SMXLoadingImage.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ var { StyleSheet, View, requireNativeComponent, Animated, Easing } = React;

var shimAssert = require('./shim-assert');

var ICON_REF = 'icon';

var SMXLoadingImage = React.createClass({
propTypes: {
name: React.PropTypes.string,
Expand Down Expand Up @@ -43,7 +41,7 @@ var SMXLoadingImage = React.createClass({
},

setNativeProps(props) {
this.refs[ICON_REF].setNativeProps(props);

},

_animate: function () {
Expand Down
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-icons",
"version": "0.3.3",
"version": "0.3.4",
"description": "Use 1000's of icon fonts in your React Native app including the tab bar.",
"main": "index.js",
"author": "Cory Smith <[email protected]>",
Expand All @@ -24,8 +24,5 @@
},
"react-native-module": {
"podfile": "react-native-icons.podspec"
},
"peerDependencies": {
"react-native": ">=0.8.0 || 0.8.0-rc || 0.8.0-rc.2 || 0.9.0-rc"
}
}

0 comments on commit 09b78e7

Please sign in to comment.