Skip to content

Commit

Permalink
fix: avatar filter disableAnimation to dom prop (#3946)
Browse files Browse the repository at this point in the history
  • Loading branch information
winchesHe authored Oct 26, 2024
1 parent c847ffb commit 1c1fd39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/components/avatar/src/use-avatar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ export function useAvatar(originalProps: UseAvatarProps = {}) {
imgProps,
className,
onError,
disableAnimation: disableAnimationProp,
...otherProps
} = originalProps;

Expand All @@ -134,8 +135,7 @@ export function useAvatar(originalProps: UseAvatarProps = {}) {

const {isFocusVisible, isFocused, focusProps} = useFocusRing();
const {isHovered, hoverProps} = useHover({isDisabled});
const disableAnimation =
originalProps.disableAnimation ?? globalContext?.disableAnimation ?? false;
const disableAnimation = disableAnimationProp ?? globalContext?.disableAnimation ?? false;

const imageStatus = useImage({src, onError, ignoreFallback});

Expand Down

0 comments on commit 1c1fd39

Please sign in to comment.