feat(HAI-002): build header and toast components
This commit is contained in:
18
packages/dashboard/app/components/ToastContainer.tsx
Normal file
18
packages/dashboard/app/components/ToastContainer.tsx
Normal 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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user