UNPKG

1.5 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/LinearGradient.tsx";import React from'react';import{requireNativeComponent}from'react-native';import extractGradient from'../lib/extract/extractGradient';import Shape from'./Shape';var LinearGradient=function(_Shape){_inherits(LinearGradient,_Shape);function LinearGradient(){_classCallCheck(this,LinearGradient);return _possibleConstructorReturn(this,_getPrototypeOf(LinearGradient).apply(this,arguments));}_createClass(LinearGradient,[{key:"render",value:function render(){var props=this.props;var x1=props.x1,y1=props.y1,x2=props.x2,y2=props.y2;return React.createElement(RNSVGLinearGradient,_extends({ref:this.refMethod,x1:x1,y1:y1,x2:x2,y2:y2},extractGradient(props,this),{__source:{fileName:_jsxFileName,lineNumber:31}}));}}]);return LinearGradient;}(Shape);LinearGradient.displayName='LinearGradient';LinearGradient.defaultProps={x1:'0%',y1:'0%',x2:'100%',y2:'0%'};export{LinearGradient as default};export var RNSVGLinearGradient=requireNativeComponent('RNSVGLinearGradient');
2//# sourceMappingURL=LinearGradient.js.map
\No newline at end of file