Files
PaperClipAI/ui/src/components/OrgChartControls.tsx
T
TonioandPaperclip 9dfdeaad86 Refine agent workspaces and organization charts (#20973)
Refine agent details, identity editing, responsive controls, and organization charts with three card tiers, clearer save feedback, and stable filtering.

Guard instruction-file renames and root configuration updates in one transaction through the agent lifecycle integration, preserving conflict checks, rollback, and configuration history.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-11-12 01:23:59 +00:00

24 lines
1.2 KiB
TypeScript

import type { ReactNode } from "react";
import { Maximize2, Minus, Plus } from "lucide-react";
import { Button } from "./ui/button";
export interface OrgChartActions {
zoomIn: () => void;
zoomOut: () => void;
fit: () => void;
}
/** Shared camera controls can stay mounted while the chart view fades away. */
export function OrgChartControls({ zoomIn, zoomOut, fit, children }: OrgChartActions & { children?: ReactNode }) {
return (
<div className="org-chart-controls flex items-center gap-2" role="group" aria-label="Org chart controls">
<div className="design-view-toggle" role="group" aria-label="Chart camera">
<Button variant="ghost" size="icon-sm" className="design-toolbar-icon" aria-label="Zoom out" title="Zoom out" onClick={zoomOut}><Minus className="size-4" /></Button>
<Button variant="ghost" size="icon-sm" className="design-toolbar-icon" aria-label="Zoom in" title="Zoom in" onClick={zoomIn}><Plus className="size-4" /></Button>
<Button variant="ghost" size="icon-sm" className="design-toolbar-icon" aria-label="Fit chart to screen" title="Fit chart to screen" onClick={fit}><Maximize2 className="size-4" /></Button>
</div>
{children}
</div>
);
}