Skip to content

Commit

Permalink
fix #1047
Browse files Browse the repository at this point in the history
  • Loading branch information
fkhadra committed Jan 21, 2024
1 parent ea14213 commit ebc7811
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Icons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit ebc7811

Please sign in to comment.