mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 23:16:03 +01:00
refactor(web/notifications): notifications rewrite
This commit is contained in:
@@ -1,30 +1,45 @@
|
||||
import { CustomNotificationProps, NotificationProps } from '../../notifications/NotificationWrapper';
|
||||
import { debugData } from '../../../utils/debugData';
|
||||
|
||||
export const debugNotification = () => {
|
||||
debugData<NotificationProps>([
|
||||
{
|
||||
action: 'notify',
|
||||
data: {
|
||||
description: 'Dunak is nerd',
|
||||
title: 'Dunak',
|
||||
id: 1,
|
||||
},
|
||||
},
|
||||
]);
|
||||
};
|
||||
|
||||
export const debugCustomNotification = () => {
|
||||
debugData<CustomNotificationProps>([
|
||||
{
|
||||
action: 'customNotify',
|
||||
data: {
|
||||
description: 'Dunak is nerd',
|
||||
icon: 'basket-shopping',
|
||||
style: {
|
||||
backgroundColor: '#2D3748',
|
||||
color: 'white',
|
||||
},
|
||||
title: 'Success',
|
||||
description: 'Notification description',
|
||||
type: 'success',
|
||||
},
|
||||
},
|
||||
]);
|
||||
debugData<CustomNotificationProps>([
|
||||
{
|
||||
action: 'customNotify',
|
||||
data: {
|
||||
title: 'Info',
|
||||
description: 'Notification description',
|
||||
type: 'info',
|
||||
},
|
||||
},
|
||||
]);
|
||||
debugData<CustomNotificationProps>([
|
||||
{
|
||||
action: 'customNotify',
|
||||
data: {
|
||||
title: 'Error',
|
||||
description: 'Notification description',
|
||||
type: 'error',
|
||||
},
|
||||
},
|
||||
]);
|
||||
debugData<CustomNotificationProps>([
|
||||
{
|
||||
action: 'customNotify',
|
||||
data: {
|
||||
title: 'Custom icon success',
|
||||
description: 'Notification description',
|
||||
type: 'success',
|
||||
icon: 'microchip',
|
||||
},
|
||||
},
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user