Skip to content
This repository has been archived by the owner on Aug 29, 2024. It is now read-only.

Commit

Permalink
fix(useOpened): Hover should also utilize onClick
Browse files Browse the repository at this point in the history
  • Loading branch information
cecilia-sanare committed Feb 23, 2024
1 parent 3355f00 commit e50f595
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/utils/element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export function useOpened(externallyOpened: boolean, event: Actions, closeOnClic
if (event === Actions.CLICK) {
eventProps.onClick = open;
} else if (event === Actions.HOVER) {
eventProps.onClick = open;
eventProps.onMouseEnter = open;
eventProps.onMouseLeave = close;
}
Expand Down

0 comments on commit e50f595

Please sign in to comment.