mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-11-17 17:48:36 +00:00
refactor(resource/interface): formatting and type definitions
This commit is contained in:
1 parent
cb645ae345
commit
6254ba9ba2
8 files changed
+388
-265
No files matched your search
@@ -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