Skip to content

Commit 0bcc609

Browse files
committed
feat(ui): show pin icon on menu item hover
Enhances the PinnableMenuItem component to display the pin icon when the parent menu item is hovered. Uses group-hover to improve user experience by making the pin action more discoverable and accessible.
1 parent cbd66a4 commit 0bcc609

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/app-admin-ui/src/Navigation/PinnableMenuItem.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,10 @@ export const PinnableMenuItem = ({ name, children }: PinnableMenuItemProps) => {
105105
const { expanded: isSidebarExpanded } = useSidebar();
106106

107107
return (
108-
<div className="wby-relative">
108+
<div className="wby-relative wby-group/pin">
109109
{children}
110110
<div
111-
className={`wby-opacity-0 hover:wby-opacity-100 wby-absolute wby-right-sm wby-top-1/2 -wby-translate-y-1/2 wby-cursor-pointer ${isPinned && isSidebarExpanded ? "wby-opacity-100" : ""}`}
111+
className={`group-hover/pin:wby-visible wby-absolute wby-right-sm wby-top-1/2 -wby-translate-y-1/2 wby-cursor-pointer ${isPinned && isSidebarExpanded ? "wby-visible" : "wby-invisible"}`}
112112
>
113113
<Icon
114114
label={isPinned ? "Unpin menu item" : "Pin menu item"}

0 commit comments

Comments
 (0)