"use client"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Badge } from "@/components/ui/badge"; import { History } from "lucide-react"; interface VersionHistoryItem { id: string; version: number; changeDescription: string; changedBy: string; changedAt: string; } interface ScreenVersionHistoryProps { versionHistory: VersionHistoryItem[]; title?: string; colorScheme?: { border: string; background: string; text: string; }; maxVisible?: number; } export function ScreenVersionHistory({ versionHistory, title = "수정 이력", colorScheme = { border: "border-purple-200 dark:border-purple-800", background: "bg-purple-50 dark:bg-purple-950/30", text: "text-purple-700 dark:text-purple-300" }, maxVisible = 3 }: ScreenVersionHistoryProps) { if (versionHistory.length === 0) { return null; } return ( {title}
최근 수정 이력 총 {versionHistory.length}건
{versionHistory.slice().reverse().slice(0, maxVisible).map((history) => (
v{history.version} {history.changeDescription} {history.changedBy} {new Date(history.changedAt).toLocaleDateString('ko-KR')}
))}
); }