Retrospring/app/javascript/retrospring/utilities/notifications.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
412 B
TypeScript
Raw Normal View History

import Toastify from 'toastify-js';
export function showErrorNotification(text: string): void {
showNotification(text, false);
}
export function showNotification(text: string, status = true): void {
Toastify({
text: text,
style: {
color: status ? 'rgb(var(--success-text))' : 'rgb(var(--danger-text))',
background: status ? 'var(--success)' : 'var(--danger)'
}
}).showToast();
}