@expo/react-native-action-sheet
Advanced tools
Comparing version 4.0.0 to 4.0.1
@@ -1,2 +0,2 @@ | ||
var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard");var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=ActionSheetProvider;var React=_interopRequireWildcard(require("react"));var _ActionSheet=_interopRequireDefault(require("./ActionSheet"));var _CustomActionSheet=_interopRequireDefault(require("./ActionSheet/CustomActionSheet"));var _context=require("./context");var _jsxFileName="/home/runner/work/react-native-action-sheet/react-native-action-sheet/src/ActionSheetProvider.tsx";function ActionSheetProvider(_ref){var children=_ref.children,useNativeDriver=_ref.useNativeDriver,_ref$useCustomActionS=_ref.useCustomActionSheet,useCustomActionSheet=_ref$useCustomActionS===void 0?false:_ref$useCustomActionS;var actionSheetRef=React.useRef(null);var context=React.useMemo(function(){return{showActionSheetWithOptions:function showActionSheetWithOptions(options,callback){if(actionSheetRef.current){actionSheetRef.current.showActionSheetWithOptions(options,callback);}}};},[actionSheetRef]);var ActionSheet=React.useMemo(function(){return useCustomActionSheet?_CustomActionSheet.default:_ActionSheet.default;},[useCustomActionSheet]);return React.createElement(_context.Provider,{value:context,__source:{fileName:_jsxFileName,lineNumber:39,columnNumber:5}},React.createElement(ActionSheet,{ref:actionSheetRef,useNativeDriver:useNativeDriver,__source:{fileName:_jsxFileName,lineNumber:40,columnNumber:7}},React.Children.only(children)));} | ||
var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard");var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var React=_interopRequireWildcard(require("react"));var _ActionSheet=_interopRequireDefault(require("./ActionSheet"));var _CustomActionSheet=_interopRequireDefault(require("./ActionSheet/CustomActionSheet"));var _context=require("./context");var _jsxFileName="/home/runner/work/react-native-action-sheet/react-native-action-sheet/src/ActionSheetProvider.tsx";var _default=React.forwardRef(function ActionSheetProvider(_ref,ref){var children=_ref.children,useNativeDriver=_ref.useNativeDriver,_ref$useCustomActionS=_ref.useCustomActionSheet,useCustomActionSheet=_ref$useCustomActionS===void 0?false:_ref$useCustomActionS;var actionSheetRef=React.useRef(null);var context=React.useMemo(function(){return{showActionSheetWithOptions:function showActionSheetWithOptions(options,callback){if(actionSheetRef.current){actionSheetRef.current.showActionSheetWithOptions(options,callback);}}};},[actionSheetRef]);React.useImperativeHandle(ref,function(){return{getContext:function getContext(){return context;},showActionSheetWithOptions:context.showActionSheetWithOptions};},[context]);var ActionSheet=React.useMemo(function(){return useCustomActionSheet?_CustomActionSheet.default:_ActionSheet.default;},[useCustomActionSheet]);return React.createElement(_context.Provider,{value:context,__source:{fileName:_jsxFileName,lineNumber:48,columnNumber:5}},React.createElement(ActionSheet,{ref:actionSheetRef,useNativeDriver:useNativeDriver,__source:{fileName:_jsxFileName,lineNumber:49,columnNumber:7}},React.Children.only(children)));});exports.default=_default; | ||
//# sourceMappingURL=ActionSheetProvider.js.map |
@@ -1,2 +0,2 @@ | ||
var _jsxFileName="/home/runner/work/react-native-action-sheet/react-native-action-sheet/src/ActionSheetProvider.tsx";import*as React from'react';import NativeActionSheet from'./ActionSheet';import CustomActionSheet from'./ActionSheet/CustomActionSheet';import{Provider}from'./context';export default function ActionSheetProvider(_ref){var children=_ref.children,useNativeDriver=_ref.useNativeDriver,_ref$useCustomActionS=_ref.useCustomActionSheet,useCustomActionSheet=_ref$useCustomActionS===void 0?false:_ref$useCustomActionS;var actionSheetRef=React.useRef(null);var context=React.useMemo(function(){return{showActionSheetWithOptions:function showActionSheetWithOptions(options,callback){if(actionSheetRef.current){actionSheetRef.current.showActionSheetWithOptions(options,callback);}}};},[actionSheetRef]);var ActionSheet=React.useMemo(function(){return useCustomActionSheet?CustomActionSheet:NativeActionSheet;},[useCustomActionSheet]);return React.createElement(Provider,{value:context,__source:{fileName:_jsxFileName,lineNumber:39,columnNumber:5}},React.createElement(ActionSheet,{ref:actionSheetRef,useNativeDriver:useNativeDriver,__source:{fileName:_jsxFileName,lineNumber:40,columnNumber:7}},React.Children.only(children)));} | ||
var _jsxFileName="/home/runner/work/react-native-action-sheet/react-native-action-sheet/src/ActionSheetProvider.tsx";import*as React from'react';import NativeActionSheet from'./ActionSheet';import CustomActionSheet from'./ActionSheet/CustomActionSheet';import{Provider}from'./context';export default React.forwardRef(function ActionSheetProvider(_ref,ref){var children=_ref.children,useNativeDriver=_ref.useNativeDriver,_ref$useCustomActionS=_ref.useCustomActionSheet,useCustomActionSheet=_ref$useCustomActionS===void 0?false:_ref$useCustomActionS;var actionSheetRef=React.useRef(null);var context=React.useMemo(function(){return{showActionSheetWithOptions:function showActionSheetWithOptions(options,callback){if(actionSheetRef.current){actionSheetRef.current.showActionSheetWithOptions(options,callback);}}};},[actionSheetRef]);React.useImperativeHandle(ref,function(){return{getContext:function getContext(){return context;},showActionSheetWithOptions:context.showActionSheetWithOptions};},[context]);var ActionSheet=React.useMemo(function(){return useCustomActionSheet?CustomActionSheet:NativeActionSheet;},[useCustomActionSheet]);return React.createElement(Provider,{value:context,__source:{fileName:_jsxFileName,lineNumber:48,columnNumber:5}},React.createElement(ActionSheet,{ref:actionSheetRef,useNativeDriver:useNativeDriver,__source:{fileName:_jsxFileName,lineNumber:49,columnNumber:7}},React.Children.only(children)));}); | ||
//# sourceMappingURL=ActionSheetProvider.js.map |
import * as React from 'react'; | ||
import { ActionSheetProviderRef } from './types'; | ||
interface Props { | ||
@@ -7,3 +8,3 @@ children: React.ReactNode; | ||
} | ||
export default function ActionSheetProvider({ children, useNativeDriver, useCustomActionSheet, }: Props): JSX.Element; | ||
export {}; | ||
declare const _default: React.ForwardRefExoticComponent<Props & React.RefAttributes<ActionSheetProviderRef>>; | ||
export default _default; |
@@ -6,2 +6,8 @@ import * as React from 'react'; | ||
} | ||
export interface ActionSheetProviderRef extends ActionSheetProps { | ||
/** | ||
* @deprecated Simply call `showActionSheetWithOptions()` directly from the ref now | ||
*/ | ||
getContext: () => ActionSheetProps; | ||
} | ||
export interface ActionSheetIOSOptions { | ||
@@ -8,0 +14,0 @@ options: string[]; |
{ | ||
"name": "@expo/react-native-action-sheet", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "A cross-platform ActionSheet for React Native", | ||
@@ -5,0 +5,0 @@ "react-native": "lib/module/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
167763
364
0