Add application feedback and refine headless canvas design boundaries
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
"use client";
|
||||
|
||||
import { toast } from "sonner";
|
||||
|
||||
/** Application adapter. Domain/editor packages must not import Sonner. */
|
||||
export type Notification = { id: string; title: string; description?: string; level?: "info" | "success" | "warning" | "error" };
|
||||
export function notify({ id, title, description, level = "info" }: Notification) {
|
||||
return toast[level](title, { id, description });
|
||||
}
|
||||
export function dismissNotification(id: string) { toast.dismiss(id); }
|
||||
Reference in New Issue
Block a user