mirror of
https://github.com/zhigang1992/react-native-vector-icons.git
synced 2026-04-28 12:15:49 +08:00
Adds React Native 0.15 support. Fixes #49
This commit is contained in:
@@ -5,10 +5,11 @@
|
||||
|
||||
// This component is a temporary workaround for android until RN core supports custom fonts
|
||||
|
||||
var React = require('react-native');
|
||||
var {
|
||||
PropTypes,
|
||||
requireNativeComponent,
|
||||
} = require('react-native');
|
||||
} = React;
|
||||
|
||||
var iface = {
|
||||
name: 'TypefaceTextView',
|
||||
@@ -23,5 +24,20 @@ var iface = {
|
||||
rotation: PropTypes.number,
|
||||
},
|
||||
};
|
||||
var RNTypefaceTextView = requireNativeComponent('RNTypefaceTextView', iface);
|
||||
|
||||
module.exports = requireNativeComponent('RNTypefaceTextView', iface);
|
||||
var TypefaceTextView = React.createClass({
|
||||
|
||||
getChildContext: function(): Object {
|
||||
return {isInAParentText: true};
|
||||
},
|
||||
|
||||
childContextTypes: {
|
||||
isInAParentText: React.PropTypes.bool
|
||||
},
|
||||
render: function() {
|
||||
return <RNTypefaceTextView {...this.props} />;
|
||||
},
|
||||
});
|
||||
|
||||
module.exports = TypefaceTextView;
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
},
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
"react-native": ">=0.4.0 || 0.5.0-rc1 || 0.6.0-rc || 0.7.0-rc || 0.7.0-rc.2 || 0.8.0-rc || 0.8.0-rc.2 || 0.9.0-rc || 0.10.0-rc || 0.11.0-rc || 0.12.0-rc || 0.13.0-rc || 0.14.0-rc"
|
||||
"react-native": ">=0.4.0 || 0.5.0-rc1 || 0.6.0-rc || 0.7.0-rc || 0.7.0-rc.2 || 0.8.0-rc || 0.8.0-rc.2 || 0.9.0-rc || 0.10.0-rc || 0.11.0-rc || 0.12.0-rc || 0.13.0-rc || 0.14.0-rc || 0.15.0-rc"
|
||||
},
|
||||
"dependencies": {
|
||||
"lodash": "^3.8.0",
|
||||
|
||||
Reference in New Issue
Block a user