From ebc7811b92872cb3c22ed334a46f83a8176f9962 Mon Sep 17 00:00:00 2001 From: Fadi Khadra Date: Sun, 21 Jan 2024 08:19:27 +0100 Subject: [PATCH] fix #1047 --- src/components/Icons.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Icons.tsx b/src/components/Icons.tsx index 13957ca6..42aa7717 100644 --- a/src/components/Icons.tsx +++ b/src/components/Icons.tsx @@ -86,12 +86,12 @@ export type IconParams = Pick< export function getIcon({ theme, type, isLoading, icon }: IconParams) { let Icon: React.ReactNode = null; - const iconProps = { theme, type, isLoading }; + const iconProps = { theme, type }; if (icon === false) { // hide } else if (isFn(icon)) { - Icon = icon(iconProps); + Icon = icon({ ...iconProps, isLoading }); } else if (isValidElement(icon)) { Icon = cloneElement(icon, iconProps); } else if (isLoading) {