fix create native component issue

fix create native component issue
This commit is contained in:
Horcrux
2016-05-15 10:50:53 +08:00
parent 8d01e8eccb
commit 233ea81a4a
13 changed files with 77 additions and 97 deletions
+5 -6
View File
@@ -1,12 +1,12 @@
import React, {Component, PropTypes} from 'react';
import {requireNativeComponent} from 'react-native';
import createNativeComponent from '../lib/createNativeComponent';
import Defs from './Defs';
import _ from 'lodash';
import extractProps from '../lib/extract/extractProps';
import extractText from '../lib/extract/extractText';
import {TextAttributes} from '../lib/attributes';
import {numberProp, textProps, fillProps, strokeProps, pathProps} from '../lib/props';
class Text extends Component{
static displayName = 'Text';
static propTypes = {
@@ -22,7 +22,8 @@ class Text extends Component{
...textProps,
...fillProps,
...strokeProps,
isInGroup: PropTypes.bool
isInGroup: PropTypes.bool,
svgId: numberProp
};
render() {
@@ -63,8 +64,6 @@ class Text extends Component{
}
}
const RNSVGText = requireNativeComponent('RNSVGText', null, {
nativeOnly: TextAttributes
});
const RNSVGText = createNativeComponent('RNSVGText');
export default Text;