feat(18-02): create DependencyIndicator component

Pure presentational component that renders blocked-by annotations
with ^ prefix in amber text. Returns null when blockedBy is empty.
This commit is contained in:
Lukas May
2026-02-04 21:32:35 +01:00
parent 62409a6302
commit a00b7b56b3

View File

@@ -0,0 +1,28 @@
import { cn } from "@/lib/utils";
interface DependencyItem {
name: string;
status: string;
}
interface DependencyIndicatorProps {
blockedBy: DependencyItem[];
type: "task" | "phase";
className?: string;
}
export function DependencyIndicator({
blockedBy,
type: _type,
className,
}: DependencyIndicatorProps) {
if (blockedBy.length === 0) return null;
const names = blockedBy.map((item) => item.name).join(", ");
return (
<div className={cn("pl-8 text-sm text-amber-600", className)}>
<span className="font-mono">^</span> blocked by: {names}
</div>
);
}