BlueWallet/screen/ActionSheet.ios.ts
2024-05-31 19:52:40 -04:00

19 lines
585 B
TypeScript

// ActionSheet.ios.ts
import { ActionSheetIOS, InteractionManager } from 'react-native';
import { ActionSheetOptions, CompletionCallback } from './ActionSheet.common';
export default class ActionSheet {
static showActionSheetWithOptions(options: ActionSheetOptions, completion: CompletionCallback): void {
InteractionManager.runAfterInteractions(() => {
const iosOptions = {
...options,
};
if (options.anchor) {
iosOptions.anchor = options.anchor;
}
ActionSheetIOS.showActionSheetWithOptions(iosOptions, completion);
});
}
}