diff --git a/openframe-frontend-core/src/components/ui/more-actions-menu.tsx b/openframe-frontend-core/src/components/ui/more-actions-menu.tsx index d16823161d..800dbd5657 100644 --- a/openframe-frontend-core/src/components/ui/more-actions-menu.tsx +++ b/openframe-frontend-core/src/components/ui/more-actions-menu.tsx @@ -1,11 +1,7 @@ 'use client'; import type React from 'react'; -import Link from '../../embed-shims/next-link'; -import { cn } from '../../utils/cn'; -import { Ellipsis01Icon } from '../icons-v2-generated'; -import { Button } from './button'; -import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from './dropdown-menu'; +import { ActionsMenuDropdown, type ActionsMenuItemConfig } from './actions-menu'; /** * @deprecated Use `ActionsMenuItem` from `./actions-menu` with @@ -58,6 +54,9 @@ export interface MoreActionsMenuProps { * supports the same trigger override (`customTrigger`), controlled `open` / * `onOpenChange`, `onCloseAutoFocus`, and `danger` items, plus grouped items, * checkboxes, and submenus. This component will be removed in a future release. + * + * This is now a thin wrapper around `ActionsMenuDropdown` to guarantee + * behavioral parity until removal. */ export function MoreActionsMenu({ items, @@ -72,92 +71,30 @@ export function MoreActionsMenu({ onOpenChange, onCloseAutoFocus, }: MoreActionsMenuProps) { - return ( - - - {trigger || ( - - )} - - - {items.map((item, idx) => { - const itemClassName = - 'flex items-center gap-2 px-4 py-3 bg-ods-bg hover:bg-ods-bg-hover focus:bg-ods-bg-hover border-b border-ods-border last:border-b-0 rounded-none cursor-pointer data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed'; - - const content = ( - <> - {item.icon && ( -
- {item.icon} -
- )} - {item.label} - - ); - - const handleActivate = (e: React.SyntheticEvent) => { - e.stopPropagation(); - if (!item.disabled) item.onClick?.(); - }; + const mappedItems: ActionsMenuItemConfig[] = items.map(item => ({ + label: item.label, + onClick: item.onClick, + href: item.href, + openInNewTab: item.openInNewTab, + icon: item.icon, + disabled: item.disabled, + danger: item.danger, + })); - // Link variant — real in the DOM, visible to crawlers - if (item.href) { - return ( - - { - if (item.disabled) { - e.preventDefault(); - e.stopPropagation(); - return; - } - if (item.onClick) handleActivate(e); - }} - > - {content} - - - ); - } - - // Button variant — onClick only - return ( - - {content} - - ); - })} -
-
+ return ( + ); } +