2022-09-14 13:50:32 +02:00
|
|
|
interface AlertDialogProps {
|
|
|
|
|
header: string;
|
|
|
|
|
content: string;
|
|
|
|
|
centered?: boolean;
|
2023-02-01 10:19:08 -05:00
|
|
|
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
|
|
|
overflow?: boolean;
|
2022-09-14 13:50:32 +02:00
|
|
|
cancel?: boolean;
|
2022-12-08 11:46:21 +01:00
|
|
|
labels?: {
|
|
|
|
|
cancel?: string;
|
|
|
|
|
confirm?: string;
|
|
|
|
|
};
|
2022-09-14 13:50:32 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type alertDialog = (data: AlertDialogProps) => Promise<'cancel' | 'confirm'>;
|
|
|
|
|
|
2024-05-08 05:23:27 +10:00
|
|
|
export const alertDialog: alertDialog = async (data, timeout?: number) =>
|
|
|
|
|
await exports.ox_lib.alertDialog(data, timeout);
|
2022-09-29 11:39:30 +02:00
|
|
|
|
2024-05-08 05:23:27 +10:00
|
|
|
export const closeAlertDialog = (reason?: string) => exports.ox_lib.closeAlertDialog(reason);
|