mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-20 14:05:09 +00:00
32 lines
684 B
JavaScript
32 lines
684 B
JavaScript
import React, {
|
|
Component,
|
|
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';
|
|
static propTypes = {
|
|
cx: propType,
|
|
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}
|
|
/>
|
|
}
|
|
}
|
|
|
|
export default Circle;
|