"use client"; import { Eye } from "lucide-react"; import type { ComponentConfig } from "@/types/report"; interface TablePreviewPanelProps { component: ComponentConfig; } export function TablePreviewPanel({ component }: TablePreviewPanelProps) { const visibleCols = (component.tableColumns ?? []).filter((c) => c.visible !== false); const hasColumns = visibleCols.length > 0; const previewRowCount = component.tableRowCount ?? 3; const headerBg = component.headerBackgroundColor || "#f3f4f6"; const headerColor = component.headerTextColor || "#111827"; const rowHeight = component.rowHeight ?? 28; const hasBorder = component.showBorder !== false; const borderClass = hasBorder ? "border border-gray-300" : ""; const totalConfigWidth = visibleCols.reduce((s, c) => s + (c.width || 120), 0); return (
실제 데이터는 저장 후 확인 가능합니다.
| {col.header} | ))}
|---|
| {col.field ? `{${col.field}}` : "—"} | ))}