From 5776512bf6fe1c5cddc68349b62ee5293e796260 Mon Sep 17 00:00:00 2001 From: icarus Date: Sun, 12 Oct 2025 04:13:32 +0800 Subject: [PATCH] fix(ToastPortal): prevent text overflow by adjusting toast width styles --- src/renderer/src/components/ToastPortal.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/renderer/src/components/ToastPortal.tsx b/src/renderer/src/components/ToastPortal.tsx index b149ae6fdf..1dae83edaf 100644 --- a/src/renderer/src/components/ToastPortal.tsx +++ b/src/renderer/src/components/ToastPortal.tsx @@ -23,7 +23,8 @@ export const ToastPortal = () => { timeout: 3000, classNames: { // This setting causes the 'hero-toast' class to be applied twice to the toast element. This is weird and I don't know why, but it works. - base: 'hero-toast' + // `w-auto` would not overwrite default style, which set the width to a fixed value and causes text overflow. + base: 'hero-toast w-auto! max-w-[50vw]' } }} />,