UNPKG

@expo/react-native-action-sheet

Version:
2 lines 2.64 kB
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/index.ios.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{ActionSheetIOS,View}from'react-native';var ActionSheet=function(_React$Component){_inherits(ActionSheet,_React$Component);var _super=_createSuper(ActionSheet);function ActionSheet(){_classCallCheck(this,ActionSheet);return _super.apply(this,arguments);}_createClass(ActionSheet,[{key:"render",value:function render(){return React.createElement(View,{pointerEvents:this.props.pointerEvents,style:{flex:1},__source:{fileName:_jsxFileName,lineNumber:16,columnNumber:7}},React.Children.only(this.props.children));}},{key:"showActionSheetWithOptions",value:function showActionSheetWithOptions(dataOptions,onSelect){var cancelButtonIndex=dataOptions.cancelButtonIndex,destructiveButtonIndex=dataOptions.destructiveButtonIndex,options=dataOptions.options,tintColor=dataOptions.tintColor,cancelButtonTintColor=dataOptions.cancelButtonTintColor,disabledButtonIndices=dataOptions.disabledButtonIndices;var iosOptions={cancelButtonIndex:cancelButtonIndex,destructiveButtonIndex:destructiveButtonIndex,options:options,tintColor:tintColor,cancelButtonTintColor:cancelButtonTintColor,disabledButtonIndices:disabledButtonIndices,title:dataOptions.title||undefined,message:dataOptions.message||undefined,anchor:dataOptions.anchor||undefined,userInterfaceStyle:dataOptions.userInterfaceStyle||undefined};ActionSheetIOS.showActionSheetWithOptions(iosOptions,onSelect);}}]);return ActionSheet;}(React.Component);export{ActionSheet as default}; //# sourceMappingURL=index.ios.js.map