-
Notifications
You must be signed in to change notification settings - Fork 11.5k
Labels
🐛 bugSomething isn't workingSomething isn't working
Description
Issue Summary
Destructive actions in dropdown menus show a double hover effect: both the parent DropdownMenuItem's subtle gray background and the child DropdownItem's error red background appear on hover. This creates a layered hover state that looks inconsistent and breaks the intended destructive styling.
The root cause is that DropdownMenuItem applies hover:bg-subtle to all items, including those containing destructive DropdownItem children. When hovering over a destructive action, both the parent container's subtle background and the child's error background are visible, creating visual conflict.
Steps to Reproduce
- Navigate to any page with a dropdown menu containing a destructive action (e.g., Settings → API Keys, Teams → Team Members, or Webhooks list)
- Open the dropdown menu (click the three-dot menu icon)
- Hover over a destructive action item (e.g., "Delete" with trash icon)
- Observe the hover state
Actual Results
Expected Results
Technical details
- Component:
packages/ui/components/dropdown/Dropdown.tsx - Issue:
DropdownMenuItemapplieshover:bg-subtleunconditionally, conflicting with destructiveDropdownItem'shover:bg-error - Solution: Detect destructive children in
DropdownMenuItemand conditionally apply transparent hover background for destructive items, while maintaining subtle hover for non-destructive items
Testing:
- Tested in multiple dropdown menus with destructive actions:
- API Keys list (Settings → Developer → API Keys)
- Team member actions (Teams → Team Members)
- Webhook actions (Settings → Developer → Webhooks)
- Booking actions
- Event type actions
- Verified non-destructive items still show subtle hover background
- Confirmed rounded corners and border radius are preserved
- Tested in both light and dark modes
Metadata
Metadata
Assignees
Labels
🐛 bugSomething isn't workingSomething isn't working