Add setNativeProps method for most of elements

This commit is contained in:
Horcrux
2016-07-18 18:34:54 +08:00
parent 2516a778ba
commit efa7363b6f
13 changed files with 74 additions and 3 deletions

View File

@@ -9,8 +9,13 @@ class Polygon extends Component{
points: PropTypes.oneOfType([PropTypes.string, PropTypes.array])
};
setNativeProps = (...args) => {
this.root.getNativeElement().setNativeProps(...args);
};
render() {
return <Path
ref={ele => this.root = ele}
{...this.props}
d={`M${this.props.points.trim().replace(/\s+/g, 'L')}z`}
/>;