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); }