mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2024-11-19 09:50:15 +01:00
19 lines
585 B
TypeScript
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);
|
|
});
|
|
}
|
|
}
|