Skip to content

Commit 4088630

Browse files
authored
fix: unmount custom loading icon correctly (#365)
1 parent 6b37985 commit 4088630

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ const Toast = (props: ToastProps) => {
219219
function getLoadingIcon() {
220220
if (icons?.loading) {
221221
return (
222-
<div className="loader" data-visible={toastType === 'loading'}>
222+
<div className="sonner-loader" data-visible={toastType === 'loading'}>
223223
{icons.loading}
224224
</div>
225225
);
@@ -366,7 +366,7 @@ const Toast = (props: ToastProps) => {
366366
{toastType || toast.icon || toast.promise ? (
367367
<div data-icon="">
368368
{toast.promise || (toast.type === 'loading' && !toast.icon)
369-
? toast.icon || icons?.loading || getLoadingIcon()
369+
? toast.icon || getLoadingIcon()
370370
: null}
371371
{toast.type !== 'loading' ? toast.icon || icons?.[toastType] || getAsset(toastType) : null}
372372
</div>

0 commit comments

Comments
 (0)