import type { ReactNode } from "react"; import { IconCheck, IconError, IconInfo, IconWarning } from "./icons.tsx"; const ICON = { success: IconCheck, error: IconError, warning: IconWarning, info: IconInfo }; export function Notice({ tone, title, children, action }: { tone: "success" | "error" | "warning" | "info"; title?: ReactNode; children?: ReactNode; action?: ReactNode; }) { const I = ICON[tone]; return (