import React from 'react'; import type { EditorAnnotation } from '../types'; interface EditorAnnotationCardProps { annotation: EditorAnnotation; onDelete: () => void; } export const EditorAnnotationCard: React.FC = ({ annotation, onDelete }) => { const lineRange = annotation.lineStart === annotation.lineEnd ? `L${annotation.lineStart}` : `L${annotation.lineStart}-${annotation.lineEnd}`; return (
{/* File path + line range */}
{annotation.filePath}:{lineRange}
{/* Selected text */}
{annotation.selectedText}
{/* Comment */} {annotation.comment && (
{annotation.comment}
)}
); };