mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-20 14:05:09 +00:00
apply common stroke processor to elements
apply common stroke processor to elements
This commit is contained in:
@@ -3,7 +3,7 @@ import React, {
|
||||
PropTypes
|
||||
} from 'react-native';
|
||||
import Ellipse from './Ellipse';
|
||||
|
||||
import strokeFilter from '../lib/strokeFilter';
|
||||
let propType = PropTypes.oneOfType([PropTypes.string, PropTypes.number]);
|
||||
class Circle extends Component{
|
||||
static displayName = 'Circle';
|
||||
@@ -12,9 +12,15 @@ class Circle extends Component{
|
||||
cy: propType,
|
||||
r: propType
|
||||
};
|
||||
static defaultProps = {
|
||||
cx: 0,
|
||||
ct: 0
|
||||
};
|
||||
|
||||
render() {
|
||||
return <Ellipse
|
||||
{...this.props}
|
||||
{...strokeFilter(this.props)}
|
||||
r={null}
|
||||
rx={this.props.r}
|
||||
ry={this.props.r}
|
||||
|
||||
Reference in New Issue
Block a user