mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-20 22:05:14 +00:00
30 lines
596 B
JavaScript
30 lines
596 B
JavaScript
import React, {
|
|
Component,
|
|
PropTypes
|
|
} from 'react-native';
|
|
import Ellipse from './Ellipse';
|
|
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,
|
|
cy: 0
|
|
};
|
|
|
|
render() {
|
|
return <Ellipse
|
|
{...this.props}
|
|
r={null}
|
|
rx={+this.props.r}
|
|
ry={+this.props.r}
|
|
/>
|
|
}
|
|
}
|
|
|
|
export default Circle;
|