UNPKG

1.62 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/RadialGradient.tsx";import React from'react';import{requireNativeComponent}from'react-native';import extractGradient from'../lib/extract/extractGradient';import Shape from'./Shape';var RadialGradient=function(_Shape){_inherits(RadialGradient,_Shape);function RadialGradient(){_classCallCheck(this,RadialGradient);return _possibleConstructorReturn(this,_getPrototypeOf(RadialGradient).apply(this,arguments));}_createClass(RadialGradient,[{key:"render",value:function render(){var props=this.props;var rx=props.rx,ry=props.ry,r=props.r,cx=props.cx,cy=props.cy,_props$fx=props.fx,fx=_props$fx===void 0?cx:_props$fx,_props$fy=props.fy,fy=_props$fy===void 0?cy:_props$fy;return React.createElement(RNSVGRadialGradient,_extends({ref:this.refMethod,fx:fx,fy:fy,rx:rx||r,ry:ry||r,cx:cx,cy:cy},extractGradient(props,this),{__source:{fileName:_jsxFileName,lineNumber:33}}));}}]);return RadialGradient;}(Shape);RadialGradient.displayName='RadialGradient';RadialGradient.defaultProps={cx:'50%',cy:'50%',r:'50%'};export{RadialGradient as default};export var RNSVGRadialGradient=requireNativeComponent('RNSVGRadialGradient');
2//# sourceMappingURL=RadialGradient.js.map
\No newline at end of file