emilkowalski / sonner

An opinionated toast component for React.

Home Page:https://sonner.emilkowal.ski

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Custom Loading Icon issue

Cybearnaut opened this issue Β· comments

Describe the feature / bug πŸ“:

the custom icons property got some problems, where the class name for loading does not match the css
which breaks the loading effect on toast.promise

example:

import { toast, Toaster } from "sonner";

// Component
<Toaster
    icons={{
      loading: <MyLoadingIcon />
    }}
/>

// Calling toast.promise function
toast.promise(myPromise, {
  loading: "Loading",
  success: "Login Successfully",
  error: "Login Fail",
});
image

Here is the quick fix of it
honeypaw@189ce92