2024-03-08 23:59:47 -04:00
|
|
|
// ActionSheet.ios.ts
|
|
|
|
import { ActionSheetIOS, InteractionManager } from 'react-native';
|
2024-05-20 10:54:13 +01:00
|
|
|
|
2024-03-08 23:59:47 -04:00
|
|
|
import { ActionSheetOptions, CompletionCallback } from './ActionSheet.common';
|
|
|
|
|
|
|
|
export default class ActionSheet {
|
|
|
|
static showActionSheetWithOptions(options: ActionSheetOptions, completion: CompletionCallback): void {
|
|
|
|
InteractionManager.runAfterInteractions(() => {
|
|
|
|
const iosOptions = {
|
|
|
|
...options,
|
|
|
|
};
|
2024-05-31 19:52:40 -04:00
|
|
|
if (options.anchor) {
|
|
|
|
iosOptions.anchor = options.anchor;
|
|
|
|
}
|
2024-03-08 23:59:47 -04:00
|
|
|
ActionSheetIOS.showActionSheetWithOptions(iosOptions, completion);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|