Skip to content

Commit

Permalink
fix: add onClick default in ImageBaseOverlay for hover mode only
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackySoul committed Jan 15, 2024
1 parent d852db6 commit 03c1d7a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const ImageBaseOverlay = ({
theme: themeProp,
visibility: visibilityProp,
children,
onClick = noop,
onClick: onClickProp,
...restProps
}: ImageBaseOverlayProps) => {
const appearance = useAppearance();
Expand All @@ -66,6 +66,8 @@ export const ImageBaseOverlay = ({
}
}

const onClick = onClickProp ?? visibility === 'on-hover' ? noop : undefined;

return (
<Tappable
{...restProps}
Expand Down

0 comments on commit 03c1d7a

Please sign in to comment.