feat: First iteration, multi themes, I18N
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import { $, h } from './dom.js';
|
||||
|
||||
const DURATION_MS = 6000;
|
||||
|
||||
export function showToast(message, { error = false } = {}) {
|
||||
const toast = h('p', { class: error ? 'toast toast--error' : 'toast', text: message });
|
||||
$('#toasts').append(toast);
|
||||
setTimeout(() => toast.remove(), DURATION_MS);
|
||||
}
|
||||
Reference in New Issue
Block a user