Toast
Docs: https://docs.api.kunkun.sh/interfaces/index.IToast
If you are using custom UI extension running in iframe, you can build your own toast component and use the API to show toast messages.
toast.message
toast.info
toast.success
toast.warning
toast.error
import { toast } from "@kksh/api/ui/template";
import { toast } from "@kksh/api/ui/custom";
import { toast } from "@kksh/api/headless";
// Show an error messageawait toast.error("Item not found")
// More optionsawait toast.error("Item not found", { description: 'The item you selected does not have a URL', duration: 3000, closeButton: true, position: 'top-left'})
await toast.warning( "Item Deleted", { actionLabel: "Undo" }, () => { toast.success("Item Restored") })