import { X } from "../icons/SystemIcons"; import { toastPersists } from "../hooks/useToast"; interface StudioToastProps { message: string; tone: "error" | "info"; onDismiss: () => void; } export function StudioToast({ message, tone, onDismiss }: StudioToastProps) { const persists = toastPersists(tone); return (
{ if (event.key === "Escape") onDismiss(); }} className={`hf-notice-in flex min-h-12 w-fit max-w-[min(680px,100%)] items-center gap-1.5 rounded-3xl bg-text-0 py-1.5 pr-1.5 pl-5 text-[14px] leading-5 font-medium wrap-anywhere text-bg-0 shadow-notice not-has-[button]:pr-5 ${persists ? "" : "cursor-pointer"}`} > {message} {persists && ( )}
); }