Add examples and refactor code

Add examples and refactor code
This commit is contained in:
Horcrux
2016-01-21 23:44:38 +08:00
parent 89b52fd4a2
commit a482948b83
61 changed files with 3143 additions and 105 deletions
+25
View File
@@ -0,0 +1,25 @@
import React, {
Component,
PropTypes
} from 'react-native';
import Ellipse from './Ellipse';
let propType = PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired;
class Circle extends Component{
static displayName = 'Circle';
static propTypes = {
cx: propType,
cy: propType,
r: propType
};
render() {
return <Ellipse
{...this.props}
r={null}
rx={this.props.r}
ry={this.props.r}
/>
}
}
export default Circle;