mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-16 22:46:03 +01:00
refactor(resource/interface): formatting and type definitions
This commit is contained in:
@@ -1,5 +1,13 @@
|
||||
local alert = nil
|
||||
|
||||
---@class AlertDialogProps
|
||||
---@field header string;
|
||||
---@field content string;
|
||||
---@field centered? boolean?;
|
||||
---@field cancel? boolean?;
|
||||
|
||||
---@param data AlertDialogProps
|
||||
---@return 'cancel' | 'confirm' | nil
|
||||
function lib.alertDialog(data)
|
||||
if alert then return end
|
||||
alert = promise.new()
|
||||
@@ -21,4 +29,4 @@ RegisterNUICallback('closeAlert', function(data, cb)
|
||||
promise:resolve(data)
|
||||
end)
|
||||
|
||||
RegisterNetEvent('ox_lib:alertDialog', lib.alertDialog)
|
||||
RegisterNetEvent('ox_lib:alertDialog', lib.alertDialog)
|
||||
Reference in New Issue
Block a user