import { Printer } from 'lucide-react'; /* * SFR-02 공통컴포넌트: 출력 버튼 */ interface PrintButtonProps { /** 출력 대상 element ref 또는 window.print() 사용 */ targetRef?: React.RefObject; label?: string; className?: string; } export function PrintButton({ targetRef, label = '출력', className = '' }: PrintButtonProps) { const handlePrint = () => { if (targetRef?.current) { const printWindow = window.open('', '_blank'); if (!printWindow) return; printWindow.document.write(` 인쇄 ${targetRef.current.innerHTML} `); printWindow.document.close(); printWindow.print(); } else { window.print(); } }; return ( ); }