svelte-sonner icon indicating copy to clipboard operation
svelte-sonner copied to clipboard

Changing state of a toast using `id` don't have animations

Open CNSeniorious000 opened this issue 7 months ago • 1 comments

Describe the bug

If I use toast.promise, when it changes from loading state to success/error state, it has a smooth scale-in-out animation, and the background color is fade-in-out too.

But if I use id to set an existing toast with loading state to success or others, it is not animated.

Reproduction

https://stackblitz.com/edit/vitejs-vite-dfaa5m?file=src%2FApp.svelte

Logs

No response

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (16) x64 AMD Ryzen 7 7840HS w/ Radeon 780M Graphics
    Memory: 1.56 GB / 15.18 GB
  Binaries:
    Node: 20.9.0 - D:\Program Files\nodejs\node.EXE
    Yarn: 1.22.22 - ~\AppData\Local\pnpm\yarn.CMD
    npm: 10.8.1 - D:\Program Files\nodejs\npm.CMD
    pnpm: 9.4.0 - ~\AppData\Local\pnpm\pnpm.CMD
    bun: 1.1.13 - ~\.bun\bin\bun.EXE
  Browsers:
    Edge: Chromium (126.0.2592.68)
    Internet Explorer: 11.0.22621.3527
  npmPackages:
    @sveltejs/kit: ^2.5.17 => 2.5.17
    svelte: ^4.2.18 => 4.2.18
    svelte-sonner: 0.3.24 => 0.3.24

Severity

annoyance

CNSeniorious000 avatar Jun 28 '24 15:06 CNSeniorious000