Alert

Usage

import { Alert } from "./components/alert.js";

// kind: "info" | "success" | "warn" | "error". Pass onClose to add a ✕.
Alert({ kind: "success", children: html`Your changes were saved.` })
Alert({ kind: "error", children: html`Something went wrong.`,
        onClose: () => showAlert.set(false) })