Refactor reuse elements

Refactor reuse elements
This commit is contained in:
Horcrux
2016-01-25 11:39:31 +08:00
parent 5f3c2e8e39
commit e001285cbe
16 changed files with 171 additions and 101 deletions
+2 -7
View File
@@ -5,10 +5,7 @@ import React, {
} from 'react-native';
import fillFilter from '../lib/fillFilter';
import strokeFilter from '../lib/strokeFilter';
let {
Shape
} = ART;
import Path from './Path';
let propType = PropTypes.oneOfType([PropTypes.string, PropTypes.number]);
class Ellipse extends Component{
@@ -28,10 +25,8 @@ class Ellipse extends Component{
a ${rx}, ${ry} 0 1, 0 ${-rx * 2}, 0
Z
`;
return <Shape
return <Path
{...props}
fill={fillFilter(props)}
{...strokeFilter(props)}
strokeCap={null}
strokeJoin={null}
cx={null}