feat(HAI-002): build header and toast components

This commit is contained in:
Dustin Byrne
2026-03-25 18:26:26 -04:00
parent 938e2dad34
commit e5caa540c2
2 changed files with 35 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
interface HeaderProps {
onNewTask: () => void;
}
export function Header({ onNewTask }: HeaderProps) {
return (
<header className="header">
<div className="header-left">
<h1 className="logo">hai</h1>
<span className="logo-sub">board</span>
</div>
<button className="btn btn-primary" onClick={onNewTask}>
+ New Task
</button>
</header>
);
}

View File

@@ -0,0 +1,18 @@
import type { Toast } from "../hooks/useToast";
interface ToastContainerProps {
toasts: Toast[];
onRemove: (id: number) => void;
}
export function ToastContainer({ toasts }: ToastContainerProps) {
return (
<div className="toast-container" id="toasts">
{toasts.map((toast) => (
<div key={toast.id} className={`toast toast-${toast.type}`}>
{toast.message}
</div>
))}
</div>
);
}