notifications feathericons
This commit is contained in:
53
src/services/Notifications.tsx
Normal file
53
src/services/Notifications.tsx
Normal 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
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user