UNPKG

1.37 kBJavaScriptView Raw
1import _extends from"@babel/runtime/helpers/extends";import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _createClass from"@babel/runtime/helpers/createClass";import _possibleConstructorReturn from"@babel/runtime/helpers/possibleConstructorReturn";import _getPrototypeOf from"@babel/runtime/helpers/getPrototypeOf";import _inherits from"@babel/runtime/helpers/inherits";var _jsxFileName="/Users/msand/WebstormProjects/react-native-svg/src/elements/Rect.tsx";import React from'react';import{requireNativeComponent}from'react-native';import{withoutXY}from'../lib/extract/extractProps';import Shape from'./Shape';var Rect=function(_Shape){_inherits(Rect,_Shape);function Rect(){_classCallCheck(this,Rect);return _possibleConstructorReturn(this,_getPrototypeOf(Rect).apply(this,arguments));}_createClass(Rect,[{key:"render",value:function render(){var props=this.props;var x=props.x,y=props.y,width=props.width,height=props.height,rx=props.rx,ry=props.ry;return React.createElement(RNSVGRect,_extends({ref:this.refMethod},withoutXY(this,props),{x:x,y:y,width:width,height:height,rx:rx,ry:ry,__source:{fileName:_jsxFileName,lineNumber:28}}));}}]);return Rect;}(Shape);Rect.displayName='Rect';Rect.defaultProps={x:0,y:0,width:0,height:0};export{Rect as default};export var RNSVGRect=requireNativeComponent('RNSVGRect');
2//# sourceMappingURL=Rect.js.map
\No newline at end of file