Files
kandev/apps/web/components/kanban-card-context-menu.tsx
T
José Almeida c64e835612 feat: allow moving tasks across workflows (#822)
* feat: allow moving tasks across workflows

* fix: address PR review feedback

* fix: address remaining PR review feedback

* fix: remove unreachable move state event

* fix: map task move conflicts correctly

* fix: address PR review nitpicks

* fix: use neutral task move error message
2026-05-05 14:13:43 +01:00

30 lines
785 B
TypeScript

"use client";
import { ContextMenu, ContextMenuContent, ContextMenuTrigger } from "@kandev/ui/context-menu";
import {
KanbanCardContextMenuItems,
type KanbanCardMenuEntry,
} from "@/components/kanban-card-menu-items";
import { useResponsiveBreakpoint } from "@/hooks/use-responsive-breakpoint";
export function KanbanCardContextMenu({
entries,
children,
}: {
entries: KanbanCardMenuEntry[];
children: React.ReactNode;
}) {
const { isDesktop } = useResponsiveBreakpoint();
if (!isDesktop) return children;
return (
<ContextMenu>
<ContextMenuTrigger className="block">{children}</ContextMenuTrigger>
<ContextMenuContent className="w-56">
<KanbanCardContextMenuItems entries={entries} />
</ContextMenuContent>
</ContextMenu>
);
}