mirror of
https://github.com/standardnotes/mobile.git
synced 2026-04-26 17:17:04 -04:00
21 lines
489 B
JavaScript
21 lines
489 B
JavaScript
import { Alert } from 'react-native';
|
|
import App from "../app"
|
|
|
|
export default class AlertManager {
|
|
|
|
static showConfirmationAlert(title, message, confirmationTitle, onConfirm, onCancel) {
|
|
// On iOS, confirm should go first. On Android, cancel should go first.
|
|
let buttons = [
|
|
{text: 'Cancel', onPress: onCancel},
|
|
{text: confirmationTitle, onPress: onConfirm},
|
|
];
|
|
Alert.alert(
|
|
title,
|
|
message,
|
|
buttons,
|
|
{ cancelable: true }
|
|
)
|
|
}
|
|
|
|
}
|