BlueWallet/screen/ActionSheet.ios.ts

19 lines
585 B
TypeScript
Raw Normal View History

// ActionSheet.ios.ts
import { ActionSheetIOS, InteractionManager } from 'react-native';
2024-05-20 11:54:13 +02:00
import { ActionSheetOptions, CompletionCallback } from './ActionSheet.common';
export default class ActionSheet {
static showActionSheetWithOptions(options: ActionSheetOptions, completion: CompletionCallback): void {
InteractionManager.runAfterInteractions(() => {
const iosOptions = {
...options,
};
2024-06-01 01:52:40 +02:00
if (options.anchor) {
iosOptions.anchor = options.anchor;
}
ActionSheetIOS.showActionSheetWithOptions(iosOptions, completion);
});
}
}