finish gradients refactor

This commit is contained in:
Horcrux
2016-07-20 22:38:45 +08:00
parent 18e1b60823
commit ff2395bcc2
64 changed files with 804 additions and 605 deletions
+6 -4
View File
@@ -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)}