From 2d915a1c5114e2c4959c8fd815a1fe829a4efc94 Mon Sep 17 00:00:00 2001 From: Nayan Bagale Date: Mon, 3 Mar 2025 00:15:22 +0530 Subject: [PATCH] fix: update toast type to ExternalToast in showToast function (#19650) --- packages/ui/components/toast/showToast.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/ui/components/toast/showToast.tsx b/packages/ui/components/toast/showToast.tsx index 07da2aaf26..3db4ada290 100644 --- a/packages/ui/components/toast/showToast.tsx +++ b/packages/ui/components/toast/showToast.tsx @@ -1,5 +1,5 @@ import classNames from "classnames"; -import type { ToastT } from "sonner"; +import type { ExternalToast } from "sonner"; import { toast } from "sonner"; import { Icon } from "../icon"; @@ -72,9 +72,9 @@ export function showToast( message: string, variant: ToastVariants, // Options or duration (duration for backwards compatibility reasons) - options: number | ToastT = TOAST_VISIBLE_DURATION + options: number | ExternalToast = TOAST_VISIBLE_DURATION ) { - const _options: ToastT = typeof options === "number" ? { duration: options, id: "" } : options; + const _options: ExternalToast = typeof options === "number" ? { duration: options } : options; if (!_options.duration) _options.duration = TOAST_VISIBLE_DURATION; if (!_options.position) _options.position = "bottom-center";