Skip to content

Commit 710d364

Browse files
mMajchTrancever
authored andcommitted
fix: fix CrossFadeIcon animation when icon passed as a function (#1896)
1 parent 87fcb50 commit 710d364

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/Icon.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ const getIconId = (source: any) => {
5959
};
6060

6161
export const isValidIcon = (source: any) =>
62-
typeof source === 'string' || isImageSource(source);
62+
typeof source === 'string' ||
63+
typeof source === 'function' ||
64+
isImageSource(source);
6365

6466
export const isEqualIcon = (a: any, b: any) =>
6567
a === b || getIconId(a) === getIconId(b);

0 commit comments

Comments
 (0)