mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-11-24 20:08:43 +00:00
feat(interface/alert): support dialog timeout
closeAlertDialog will now error if a reason is passed. Added timeout param to alertDialog. Resolves #522.
This commit is contained in:
1 parent
b1cb2142f0
commit
43905bdd62
2 files changed
+21
-7
No files matched your search
@@ -13,6 +13,7 @@ interface AlertDialogProps {
|
||||
|
||||
type alertDialog = (data: AlertDialogProps) => Promise<'cancel' | 'confirm'>;
|
||||
|
||||
export const alertDialog: alertDialog = async (data) => await exports.ox_lib.alertDialog(data);
|
||||
export const alertDialog: alertDialog = async (data, timeout?: number) =>
|
||||
await exports.ox_lib.alertDialog(data, timeout);
|
||||
|
||||
export const closeAlertDialog = () => exports.ox_lib.closeAlertDialog();
|
||||
export const closeAlertDialog = (reason?: string) => exports.ox_lib.closeAlertDialog(reason);
|
||||
Reference in new issue
Block a user