mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-09-04 16:23:21 +00:00
refactor(ui/notify): Cleanup internal code & new config options
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
// Will register dev utilities on window
|
||||
export const registerWindowMethods = () => {
|
||||
window.SendNotification = (data) => {
|
||||
window.dispatchEvent(
|
||||
new MessageEvent("message", {
|
||||
data: {
|
||||
action: "notify",
|
||||
...data,
|
||||
},
|
||||
})
|
||||
);
|
||||
};
|
||||
};
|
||||
|
||||
// Used for browser env handling
|
||||
export const BrowserMockConfigData = {
|
||||
NotificationStyling: {
|
||||
group: true,
|
||||
position: "top-right",
|
||||
progress: true,
|
||||
},
|
||||
VariantDefinitions: {
|
||||
success: {
|
||||
color: "green",
|
||||
icon: "done",
|
||||
},
|
||||
primary: {
|
||||
color: "blue",
|
||||
icon: "info",
|
||||
},
|
||||
error: {
|
||||
color: "red",
|
||||
icon: "dangerous",
|
||||
},
|
||||
police: {
|
||||
color: "blue",
|
||||
icon: "local_police",
|
||||
},
|
||||
ambulance: {
|
||||
color: "red",
|
||||
icon: "fas fa-ambulance",
|
||||
},
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user