import { useState } from 'react'; const PrintModal = ({ isOpen, onClose, children }) => { if (!isOpen) return null; const handlePrint = () => { const printWindow = window.open('', '_blank'); printWindow.document.write('Print'); printWindow.document.write(''); printWindow.document.write(''); printWindow.document.write(document.getElementById('printable-content').innerHTML); printWindow.document.write(''); printWindow.document.close(); printWindow.focus(); setTimeout(() => { printWindow.print(); printWindow.close(); }, 250); }; return (

Print Preview

{children}
); }; export default PrintModal;