mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-05-23 03:06:28 +00:00
React API must be now required from react package
This commit is contained in:
+1
-3
@@ -1,6 +1,4 @@
|
||||
import {
|
||||
PropTypes
|
||||
} from 'react-native';
|
||||
import {PropTypes} from 'react';
|
||||
import Shape, {CIRCLE} from './Shape';
|
||||
import {circleProps, pathProps, fillProps, strokeProps} from '../lib/props';
|
||||
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
import React, {
|
||||
Component,
|
||||
PropTypes
|
||||
} from 'react-native';
|
||||
import React, {Component, PropTypes} from 'react';
|
||||
import {NativeGroup} from './G';
|
||||
import {set, remove} from '../lib/extract/extractClipping';
|
||||
|
||||
|
||||
+1
-6
@@ -1,9 +1,4 @@
|
||||
import React, {
|
||||
Children,
|
||||
Component,
|
||||
cloneElement,
|
||||
PropTypes
|
||||
} from 'react-native';
|
||||
import React, {Children, Component, cloneElement, PropTypes} from 'react';
|
||||
import {NativeGroup} from './G';
|
||||
let map = {};
|
||||
|
||||
|
||||
+1
-3
@@ -1,6 +1,4 @@
|
||||
import {
|
||||
PropTypes
|
||||
} from 'react-native';
|
||||
import {PropTypes} from 'react';
|
||||
import Shape, {ELLIPSE} from './Shape';
|
||||
import {ellipseProps, pathProps, fillProps, strokeProps} from '../lib/props';
|
||||
|
||||
|
||||
+2
-5
@@ -1,8 +1,5 @@
|
||||
import React, {
|
||||
Component,
|
||||
PropTypes
|
||||
} from 'react-native';
|
||||
import createReactNativeComponentClass from 'react-native/Libraries/ReactNative/createReactNativeComponentClass';
|
||||
import React, {Component, PropTypes} from 'react';
|
||||
import createReactNativeComponentClass from 'react/lib/createReactNativeComponentClass';
|
||||
import Defs from './Defs';
|
||||
import _ from 'lodash';
|
||||
import {GroupAttributes} from '../lib/attributes';
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
import React, {
|
||||
Component,
|
||||
Children
|
||||
} from 'react-native';
|
||||
import React, {Children, Component} from 'react';
|
||||
import {NativeGroup} from './G';
|
||||
import {set, remove} from '../lib/extract/patterns';
|
||||
import percentToFloat from '../lib/percentToFloat';
|
||||
|
||||
+2
-5
@@ -1,12 +1,9 @@
|
||||
import React, {
|
||||
Component,
|
||||
PropTypes
|
||||
} from 'react-native';
|
||||
import React, {Component, PropTypes} from 'react';
|
||||
import extractProps from '../lib/extract/extractProps';
|
||||
import {ImageAttributes} from '../lib/attributes';
|
||||
import {numberProp} from '../lib/props';
|
||||
import resolveAssetSource from 'react-native/Libraries/Image/resolveAssetSource';
|
||||
import createReactNativeComponentClass from 'react-native/Libraries/ReactNative/createReactNativeComponentClass';
|
||||
import createReactNativeComponentClass from 'react/lib/createReactNativeComponentClass';
|
||||
import formatPercentageProps from '../lib/formatPercentageProps';
|
||||
|
||||
class Image extends Component{
|
||||
|
||||
+1
-3
@@ -1,6 +1,4 @@
|
||||
import {
|
||||
PropTypes
|
||||
} from 'react-native';
|
||||
import {PropTypes} from 'react';
|
||||
import Shape, {LINE} from './Shape';
|
||||
import {lineProps, pathProps, fillProps, strokeProps} from '../lib/props';
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
import {
|
||||
PropTypes
|
||||
} from 'react-native';
|
||||
import {PropTypes} from 'react';
|
||||
|
||||
import stopsOpacity from '../lib/stopsOpacity';
|
||||
import {numberProp} from '../lib/props';
|
||||
|
||||
+2
-5
@@ -1,10 +1,7 @@
|
||||
import React, {
|
||||
Component,
|
||||
PropTypes
|
||||
} from 'react-native';
|
||||
import React, {Component, PropTypes} from 'react';
|
||||
import _ from 'lodash';
|
||||
import Defs from './Defs';
|
||||
import createReactNativeComponentClass from 'react-native/Libraries/ReactNative/createReactNativeComponentClass';
|
||||
import createReactNativeComponentClass from 'react/lib/createReactNativeComponentClass';
|
||||
import extractProps from '../lib/extract/extractProps';
|
||||
import SerializablePath from '../lib/SerializablePath';
|
||||
import {PathAttributes} from '../lib/attributes';
|
||||
|
||||
+1
-4
@@ -1,7 +1,4 @@
|
||||
import {
|
||||
Component,
|
||||
PropTypes
|
||||
} from 'react-native';
|
||||
import {Component, PropTypes} from 'react';
|
||||
|
||||
let propType = PropTypes.oneOfType([PropTypes.string, PropTypes.number]);
|
||||
|
||||
|
||||
+1
-4
@@ -1,7 +1,4 @@
|
||||
import React, {
|
||||
Component,
|
||||
PropTypes
|
||||
} from 'react-native';
|
||||
import React, {Component, PropTypes} from 'react';
|
||||
import Path from './Path';
|
||||
import {pathProps} from '../lib/props';
|
||||
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
import React, {
|
||||
Component,
|
||||
PropTypes
|
||||
} from 'react-native';
|
||||
import React, {Component, PropTypes} from 'react';
|
||||
import Path from './Path';
|
||||
import {pathProps} from '../lib/props';
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
import {
|
||||
PropTypes
|
||||
} from 'react-native';
|
||||
import {PropTypes} from 'react';
|
||||
import stopsOpacity from '../lib/stopsOpacity';
|
||||
import {numberProp} from '../lib/props';
|
||||
import Gradient from './Gradient';
|
||||
|
||||
+1
-3
@@ -1,6 +1,4 @@
|
||||
import {
|
||||
PropTypes
|
||||
} from 'react-native';
|
||||
import {PropTypes} from 'react';
|
||||
import Shape, {RECT} from './Shape';
|
||||
import {rectProps, pathProps, fillProps, strokeProps} from '../lib/props';
|
||||
|
||||
|
||||
+2
-4
@@ -1,12 +1,10 @@
|
||||
import React, {
|
||||
Component
|
||||
} from 'react-native';
|
||||
import React, {Component} from 'react';
|
||||
import './Path'; // must import Path first, don`t know why. without this will throw an `Super expression must either be null or a function, not undefined`
|
||||
import _ from 'lodash';
|
||||
import extractProps from '../lib/extract/extractProps';
|
||||
import {ShapeAttributes} from '../lib/attributes';
|
||||
import formatPercentageProps from '../lib/formatPercentageProps';
|
||||
import createReactNativeComponentClass from 'react-native/Libraries/ReactNative/createReactNativeComponentClass';
|
||||
import createReactNativeComponentClass from 'react/lib/createReactNativeComponentClass';
|
||||
import {circleProps, ellipseProps, lineProps, rectProps} from '../lib/props';
|
||||
|
||||
/**
|
||||
|
||||
+1
-4
@@ -1,7 +1,4 @@
|
||||
import {
|
||||
Component,
|
||||
PropTypes
|
||||
} from 'react-native';
|
||||
import {Component, PropTypes} from 'react';
|
||||
class Stop extends Component{
|
||||
static displayName = 'Stop';
|
||||
static propTypes = {
|
||||
|
||||
+2
-8
@@ -1,11 +1,5 @@
|
||||
import React, {
|
||||
Component,
|
||||
PropTypes,
|
||||
Children,
|
||||
cloneElement,
|
||||
View,
|
||||
requireNativeComponent
|
||||
} from 'react-native';
|
||||
import React, {Children, Component, cloneElement, PropTypes} from 'react';
|
||||
import {View, requireNativeComponent} from "react-native";
|
||||
import ViewBox from './ViewBox';
|
||||
|
||||
// Svg - Root node of all Svg elements
|
||||
|
||||
+1
-4
@@ -1,7 +1,4 @@
|
||||
import React, {
|
||||
Component,
|
||||
PropTypes
|
||||
} from 'react-native';
|
||||
import React, {Component, PropTypes} from 'react';
|
||||
|
||||
import ViewBox from './ViewBox';
|
||||
import Defs from './Defs';
|
||||
|
||||
+2
-5
@@ -1,10 +1,7 @@
|
||||
import React, {
|
||||
Component,
|
||||
PropTypes
|
||||
} from 'react-native';
|
||||
import React, {Component, PropTypes} from 'react';
|
||||
import Defs from './Defs';
|
||||
import _ from 'lodash';
|
||||
import createReactNativeComponentClass from 'react-native/Libraries/ReactNative/createReactNativeComponentClass';
|
||||
import createReactNativeComponentClass from 'react/lib/createReactNativeComponentClass';
|
||||
import extractProps from '../lib/extract/extractProps';
|
||||
import extractText from '../lib/extract/extractText';
|
||||
import {TextAttributes} from '../lib/attributes';
|
||||
|
||||
+1
-4
@@ -1,7 +1,4 @@
|
||||
import React, {
|
||||
Component,
|
||||
PropTypes
|
||||
} from 'react-native';
|
||||
import React, {Component, PropTypes} from 'react';
|
||||
import Defs from './Defs';
|
||||
class Use extends Component{
|
||||
static displayName = 'Use';
|
||||
|
||||
+1
-3
@@ -1,6 +1,4 @@
|
||||
import React, {
|
||||
Component
|
||||
} from 'react-native';
|
||||
import React, {Component} from 'react';
|
||||
|
||||
import G from './G';
|
||||
import extractViewbox from '../lib/extract/extractViewbox';
|
||||
|
||||
+1
-3
@@ -1,4 +1,2 @@
|
||||
import {
|
||||
PropTypes
|
||||
} from 'react-native';
|
||||
import {PropTypes} from "react";
|
||||
export default PropTypes.oneOfType([PropTypes.string, PropTypes.number]);
|
||||
|
||||
+1
-3
@@ -1,6 +1,4 @@
|
||||
import {
|
||||
PropTypes
|
||||
} from 'react-native';
|
||||
import {PropTypes} from "react";
|
||||
|
||||
const numberProp = PropTypes.oneOfType([PropTypes.string, PropTypes.number]);
|
||||
|
||||
|
||||
+1
-1
@@ -36,6 +36,6 @@
|
||||
}
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react-native": "^0.24.0"
|
||||
"react-native": "^0.25.0"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user