c64e835612
* 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
30 lines
785 B
TypeScript
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>
|
|
);
|
|
}
|