feat(client/notifications): Add default chakra notification functions

This commit is contained in:
Luke
2022-04-16 12:03:50 +02:00
parent caa0b8284f
commit 66f9460729

View File

@@ -10,6 +10,8 @@
iconColor?: string iconColor?: string
} }
```]] ```]]
-- Custom notifications with a lot of allowed styling
---@param data table ---@param data table
function lib.notify(data) function lib.notify(data)
SendNUIMessage({ SendNUIMessage({
@@ -18,4 +20,12 @@ function lib.notify(data)
}) })
end end
-- Default Chakra UI notifications
function lib.defaultNotify(data)
SendNUIMessage({
action = 'notify',
data = data
})
end
RegisterNetEvent('ox_lib:notify', lib.notify) RegisterNetEvent('ox_lib:notify', lib.notify)