import type { Card, Column, Label } from "@/types/board"; import { LabelDots } from "@/components/board/LabelDots"; import { ChecklistBar } from "@/components/board/ChecklistBar"; import { format, isPast, isToday } from "date-fns"; interface CardOverlayProps { card: Card; boardLabels: Label[]; } export function CardOverlay({ card, boardLabels }: CardOverlayProps) { const hasDueDate = card.dueDate != null; const dueDate = hasDueDate ? new Date(card.dueDate!) : null; const overdue = dueDate != null && isPast(dueDate) && !isToday(dueDate); return (
{card.title}
{/* Footer row: due date + checklist */} {(hasDueDate || card.checklist.length > 0) && (+{column.cardIds.length - 3} more
)}