2022-01-09 10:42:08 -08:00
|
|
|
import Toastify from 'toastify-js';
|
|
|
|
|
2022-01-02 18:29:12 -08:00
|
|
|
export function showErrorNotification(text: string): void {
|
|
|
|
showNotification(text, false);
|
|
|
|
}
|
|
|
|
|
|
|
|
export function showNotification(text: string, status = true): void {
|
2022-01-09 10:42:08 -08:00
|
|
|
Toastify({
|
|
|
|
text: text,
|
|
|
|
style: {
|
|
|
|
color: status ? 'rgb(var(--success-text))' : 'rgb(var(--danger-text))',
|
|
|
|
background: status ? 'var(--success)' : 'var(--danger)'
|
|
|
|
}
|
|
|
|
}).showToast();
|
2022-01-02 18:29:12 -08:00
|
|
|
}
|