- Run record
- loading
Loading this Run…
Loading the Revisions of this Run…
A published source file of Revision 0 of Boardly — Website Relaunch 1.1.0, shown as text in the browser.
import { IconAlert, IconClose } from "./Icons";
export type Toast = { id: number; text: string; tone: "info" | "warn" };
export function Toasts({ toasts, onDismiss }: { toasts: Toast[]; onDismiss: (id: number) => void }) {
return (
<div className="toasts" role="status" aria-live="polite">
{toasts.map(t => (
<div key={t.id} className={`toast${t.tone === "warn" ? " warn" : ""}`}>
{t.tone === "warn" && (
<span className="toast-icon">
<IconAlert size={15} />
</span>
)}
<span className="toast-text">{t.text}</span>
<button type="button" className="toast-x" aria-label="Dismiss notification" onClick={() => onDismiss(t.id)}>
<IconClose size={13} />
</button>
</div>
))}
</div>
);
}Source is browser-viewable only. There is no download or archive endpoint, and no additional license is granted beyond inspection and research.