UNPKG

@expo/react-native-action-sheet

Version:
2 lines 3.51 kB
import _extends from"@babel/runtime/helpers/extends";import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _createClass from"@babel/runtime/helpers/createClass";import _inherits from"@babel/runtime/helpers/inherits";import _possibleConstructorReturn from"@babel/runtime/helpers/possibleConstructorReturn";import _getPrototypeOf from"@babel/runtime/helpers/getPrototypeOf";var _jsxFileName="/home/runner/work/react-native-action-sheet/react-native-action-sheet/src/ActionSheet/TouchableNativeFeedbackSafe.tsx";function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return _possibleConstructorReturn(this,result);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true;}catch(e){return false;}}import*as React from'react';import{Platform,TouchableNativeFeedback,TouchableOpacity,View}from'react-native';var CustomTouchableOpacity=function(_React$Component){_inherits(CustomTouchableOpacity,_React$Component);var _super=_createSuper(CustomTouchableOpacity);function CustomTouchableOpacity(){_classCallCheck(this,CustomTouchableOpacity);return _super.apply(this,arguments);}_createClass(CustomTouchableOpacity,[{key:"render",value:function render(){return React.createElement(TouchableOpacity,_extends({},this.props,{__source:{fileName:_jsxFileName,lineNumber:17,columnNumber:12}}),this.props.children);}}]);return CustomTouchableOpacity;}(React.Component);CustomTouchableOpacity.SelectableBackground=function(){return{};};CustomTouchableOpacity.SelectableBackgroundBorderless=function(){return{};};CustomTouchableOpacity.Ripple=function(color,borderless){return{};};var TouchableComponent=Platform.select({web:CustomTouchableOpacity,default:Platform.Version<=20?CustomTouchableOpacity:TouchableNativeFeedback});var TouchableNativeFeedbackSafe=function(_React$Component2){_inherits(TouchableNativeFeedbackSafe,_React$Component2);var _super2=_createSuper(TouchableNativeFeedbackSafe);function TouchableNativeFeedbackSafe(){_classCallCheck(this,TouchableNativeFeedbackSafe);return _super2.apply(this,arguments);}_createClass(TouchableNativeFeedbackSafe,[{key:"render",value:function render(){if(TouchableComponent===TouchableNativeFeedback){return React.createElement(TouchableComponent,_extends({},this.props,{style:{},__source:{fileName:_jsxFileName,lineNumber:39,columnNumber:9}}),React.createElement(View,{style:this.props.style,__source:{fileName:_jsxFileName,lineNumber:40,columnNumber:11}},this.props.children));}return React.createElement(TouchableComponent,_extends({},this.props,{__source:{fileName:_jsxFileName,lineNumber:46,columnNumber:12}}),this.props.children);}}]);return TouchableNativeFeedbackSafe;}(React.Component);TouchableNativeFeedbackSafe.SelectableBackground=TouchableComponent.SelectableBackground;TouchableNativeFeedbackSafe.SelectableBackgroundBorderless=TouchableComponent.SelectableBackgroundBorderless;TouchableNativeFeedbackSafe.Ripple=TouchableComponent.Ripple;export{TouchableNativeFeedbackSafe as default}; //# sourceMappingURL=TouchableNativeFeedbackSafe.js.map