mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-03 23:16:13 +00:00
finish gradients refactor
This commit is contained in:
+6
-4
@@ -1,16 +1,18 @@
|
||||
import React, {PropTypes} from 'react';
|
||||
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';
|
||||
import {pathProps, numberProp} from '../lib/props';
|
||||
|
||||
class Line extends Shape {
|
||||
static displayName = 'Line';
|
||||
|
||||
static propTypes = {
|
||||
...pathProps,
|
||||
...lineProps
|
||||
x1: numberProp.isRequired,
|
||||
x2: numberProp.isRequired,
|
||||
y1: numberProp.isRequired,
|
||||
y2: numberProp.isRequired
|
||||
};
|
||||
|
||||
static defaultProps = {
|
||||
@@ -25,7 +27,7 @@ class Line extends Shape {
|
||||
};
|
||||
|
||||
render() {
|
||||
let props = mergeContext(this.props, this.context);
|
||||
let props = this.props;
|
||||
return <RNSVGLine
|
||||
ref={ele => this.root = ele}
|
||||
{...this.extractProps(props)}
|
||||
|
||||
Reference in New Issue
Block a user