mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-09 09:27:20 +00:00
use createReactNativeComponentClass inside from react
due to the peerDependency of react-native is >=0.29.0. so there is no need to consider compatibility with react-native@0.27.0 and below.
This commit is contained in:
+6
-2
@@ -1,5 +1,6 @@
|
||||
import React, {PropTypes} from 'react';
|
||||
import createNativeComponent from '../lib/createNativeComponent';
|
||||
import createReactNativeComponentClass from 'react/lib/createReactNativeComponentClass';
|
||||
import {LineAttributes} from '../lib/attributes';
|
||||
import mergeContext from '../lib/mergeContext';
|
||||
import Shape from './Shape';
|
||||
import {lineProps, pathProps, fillProps, strokeProps, numberProp} from '../lib/props';
|
||||
@@ -31,6 +32,9 @@ class Line extends Shape {
|
||||
}
|
||||
}
|
||||
|
||||
const RNSVGLine = createNativeComponent('RNSVGLine');
|
||||
const RNSVGLine = createReactNativeComponentClass({
|
||||
validAttributes: LineAttributes,
|
||||
uiViewClassName: 'RNSVGLine'
|
||||
});
|
||||
|
||||
export default Line;
|
||||
|
||||
Reference in New Issue
Block a user