diff --git a/.changeset/many-moles-join.md b/.changeset/many-moles-join.md new file mode 100644 index 00000000..338fa46b --- /dev/null +++ b/.changeset/many-moles-join.md @@ -0,0 +1,5 @@ +--- +'@lsst-sqre/squared': minor +--- + +Disable opening and closing the GafaelfawrUserMenu on hover. This is a better UX because it allows for less precise mousing when using the menu. diff --git a/packages/squared/src/components/GafaelfawrUserMenu/GafaelfawrUserMenu.stories.tsx b/packages/squared/src/components/GafaelfawrUserMenu/GafaelfawrUserMenu.stories.tsx index ad032cc9..018bae48 100644 --- a/packages/squared/src/components/GafaelfawrUserMenu/GafaelfawrUserMenu.stories.tsx +++ b/packages/squared/src/components/GafaelfawrUserMenu/GafaelfawrUserMenu.stories.tsx @@ -73,7 +73,7 @@ export const Default: Story = { new Map() }}> - Account Settings + Account settings Security tokens diff --git a/packages/squared/src/components/GafaelfawrUserMenu/Menu.tsx b/packages/squared/src/components/GafaelfawrUserMenu/Menu.tsx index 65e9e852..bd8b36fd 100644 --- a/packages/squared/src/components/GafaelfawrUserMenu/Menu.tsx +++ b/packages/squared/src/components/GafaelfawrUserMenu/Menu.tsx @@ -21,17 +21,28 @@ export const Menu = ({ children, logoutHref, username }: MenuProps) => { - + event.preventDefault()} + onPointerEnter={(event) => event.preventDefault()} + onPointerLeave={(event) => event.preventDefault()} + > {username} - + event.preventDefault()} + onPointerEnter={(event) => event.preventDefault()} + onPointerLeave={(event) => event.preventDefault()} + > {children} Log out - + event.preventDefault()} + onPointerLeave={(event) => event.preventDefault()} + /> );