"use client" /** * Reusable building blocks for kanban / board cards (icon rows, two-line blocks, placeholders). */ import * as React from "react" import { cn } from "../../lib/utils" import type { BoardLineCount } from "../../lib/data-list-display-options" export function BoardCardIconRow({ iconClass, children, }: { iconClass: string children: React.ReactNode }) { return (
{children}
) } export function BoardCardTwoLineBlock({ iconClass, line1, line2, line2ClassName, }: { iconClass: string line1: React.ReactNode /** Omitted for a single-line row (same icon + primary alignment as Placements). */ line2?: React.ReactNode /** Override default muted line-2 (e.g. badges / rich cells). */ line2ClassName?: string }) { const showLine2 = line2 !== undefined && line2 !== null return (
{line1}
{showLine2 ? (
{line2}
) : null}
) } export function lineClampClass(n: BoardLineCount): string { const base = "min-w-0 overflow-hidden break-words" if (n === 1) return cn(base, "line-clamp-1") if (n === 2) return cn(base, "line-clamp-2") return cn(base, "line-clamp-3") } export function BoardNewCardPlaceholder({ position }: { position: "above" | "below" }) { return (