From 1f159edf0741b0249010f0a062dd787816f2244c Mon Sep 17 00:00:00 2001 From: mkelvers Date: Tue, 16 Jun 2026 17:25:15 +0200 Subject: [PATCH] fix: add variant to watchlist toast type --- static/watchlist.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/static/watchlist.ts b/static/watchlist.ts index df8a9ef..f9b4d16 100644 --- a/static/watchlist.ts +++ b/static/watchlist.ts @@ -54,9 +54,15 @@ class WatchlistStore { const watchlistStore = new WatchlistStore(); -const getShowToast = (): ((opts: { message: string; duration?: number }) => void) | null => { +const getShowToast = (): + | ((opts: { message: string; duration?: number; variant?: "default" | "destructive" }) => void) + | null => { const anyWindow = window as unknown as { - showToast?: (opts: { message: string; duration?: number }) => void; + showToast?: (opts: { + message: string; + duration?: number; + variant?: "default" | "destructive"; + }) => void; }; return typeof anyWindow.showToast === "function" ? anyWindow.showToast : null; };