Files
ox_lib/package/client/resource/interface/alert.ts

20 lines
536 B
TypeScript
Raw Normal View History

2022-09-14 13:50:32 +02:00
interface AlertDialogProps {
header: string;
content: string;
centered?: boolean;
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
overflow?: boolean;
2022-09-14 13:50:32 +02:00
cancel?: boolean;
labels?: {
cancel?: string;
confirm?: string;
};
2022-09-14 13:50:32 +02:00
}
type alertDialog = (data: AlertDialogProps) => Promise<'cancel' | 'confirm'>;
export const alertDialog: alertDialog = async (data, timeout?: number) =>
await exports.ox_lib.alertDialog(data, timeout);
export const closeAlertDialog = (reason?: string) => exports.ox_lib.closeAlertDialog(reason);