import { ThemeColors, FileNode } from '../types';
// Info Row Component for consistent styling
function InfoRow({
label,
value,
valueColor = 'inherit',
highlight = false,
colors,
}: {
label: string;
value: string | number;
valueColor?: string;
highlight?: boolean;
colors: ThemeColors;
}) {
return (
{label}
{value}
);
}
interface NodeDetailsProps {
colors: ThemeColors;
selectedNode: FileNode | null;
onClose?: () => void;
}
export function NodeDetails({
colors,
selectedNode,
onClose,
}: NodeDetailsProps) {
return (
{/* Header */}
{selectedNode ? (
{/* File Name - No border, just padding */}
{/* Metrics - No border */}
Metrics
{selectedNode.duplicates !== undefined && (
)}
{/* Description/Details - No border */}
{selectedNode.title && (
)}
) : (
Click a node to view details
)}
);
}
// Keep the old component for backwards compatibility
export function NodeDetailsOld({ colors, selectedNode }: NodeDetailsProps) {
return ;
}