UNPKG

@wener/console

Version:

Base console UI toolkit

11 lines (10 loc) 385 B
import { toast } from "react-hot-toast"; import { resolveErrorMessage } from "./resolveErrorMessage.js"; export function showPromiseToast(p, { loading = "\u52A0\u8F7D\u4E2D...", success = "\u6210\u529F", error = (e) => resolveErrorMessage(e) } = {}) { return toast.promise(p, { loading, success, error }); } //# sourceMappingURL=showPromiseToast.js.map