notifications feathericons

This commit is contained in:
2023-02-19 18:29:09 +01:00
parent cb28767783
commit e765fed019
17 changed files with 80 additions and 125 deletions

View File

@ -0,0 +1,53 @@
import React from 'react';
import { showNotification } from '@mantine/notifications';
export function notificationSuccess(msg: string)
{
const WWW_ROOT: string = process.env.REACT_APP_WWW_ROOT!;
showNotification(
{
icon: <img
style=
{{
backgroundColor: 'lightgreen',
borderRadius: '16px'
}}
src = {WWW_ROOT+'uploads/check-circle.svg'}/> ,
//color: 'green',
message: msg
});
}
export function notificationError(msg: string)
{
const WWW_ROOT: string = process.env.REACT_APP_WWW_ROOT!;
showNotification(
{
icon: <img
style=
{{
backgroundColor: 'red',
borderRadius: '16px'
}}
src = {WWW_ROOT+'uploads/x-circle.svg'}/> ,
//color: 'green',
message: msg
});
}
export function notificationAlert(msg: string)
{
const WWW_ROOT: string = process.env.REACT_APP_WWW_ROOT!;
showNotification(
{
icon: <img
style=
{{
backgroundColor: 'orange',
borderRadius: '16px'
}}
src = {WWW_ROOT+'uploads/alert-circle.svg'}/> ,
//color: 'green',
message: msg
});
}