refactor(web/notifications): notifications rewrite

This commit is contained in:
Luke
2023-01-01 14:31:11 +01:00
parent f18fec5130
commit ae8e588c67
5 changed files with 136 additions and 70 deletions

View File

@@ -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',
},
},
]);