1 | import React from 'react';
|
2 | import { extract } from '../lib/extract/extractProps';
|
3 | import { NumberProp } from '../lib/extract/types';
|
4 | import Shape from './Shape';
|
5 | import { RNSVGEllipse } from './NativeComponents';
|
6 |
|
7 | export default class Ellipse extends Shape<{
|
8 | cx?: NumberProp;
|
9 | cy?: NumberProp;
|
10 | rx?: NumberProp;
|
11 | ry?: NumberProp;
|
12 | }> {
|
13 | static displayName = 'Ellipse';
|
14 |
|
15 | static defaultProps = {
|
16 | cx: 0,
|
17 | cy: 0,
|
18 | rx: 0,
|
19 | ry: 0,
|
20 | };
|
21 |
|
22 | render() {
|
23 | const { props } = this;
|
24 | const { cx, cy, rx, ry } = props;
|
25 | const ellipseProps = { ...extract(this, props), cx, cy, rx, ry };
|
26 | return <RNSVGEllipse ref={this.refMethod} {...ellipseProps} />;
|
27 | }
|
28 | }
|