/** * FormSection - 폼 섹션 카드 컴포넌트 * * 등록 페이지의 각 섹션을 카드로 감싸는 컴포넌트 * 제목, 설명, 아이콘을 포함할 수 있습니다. */ import { ReactNode } from "react"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "../ui/card"; import { LucideIcon } from "lucide-react"; export interface FormSectionProps { title?: string; description?: string; icon?: LucideIcon; children: ReactNode; className?: string; headerAction?: ReactNode; variant?: 'default' | 'highlighted'; } export function FormSection({ title, description, icon: Icon, children, className = "", headerAction, variant = 'default', }: FormSectionProps) { const variantClasses = { default: "", highlighted: "border-blue-200 bg-blue-50/30", }; return ( {(title || description) && (
{Icon && }
{title && {title}} {description && ( {description} )}
{headerAction && (
{headerAction}
)}
)} {children}
); }