fix: disable animations on print and remove minHeight forcing 2 pages
This commit is contained in:
@@ -11,11 +11,11 @@ export const PrintableReport: React.FC<PrintableReportProps> = ({ reports }) =>
|
|||||||
<div
|
<div
|
||||||
id="printable-report-container"
|
id="printable-report-container"
|
||||||
data-report={JSON.stringify(reports)}
|
data-report={JSON.stringify(reports)}
|
||||||
className="light bg-white text-slate-900 flex flex-col gap-[20mm]"
|
className="light bg-white text-slate-900 flex flex-col gap-8"
|
||||||
style={{ width: '210mm', background: 'white' }}
|
style={{ background: 'white' }}
|
||||||
>
|
>
|
||||||
{reports.map((report, idx) => (
|
{reports.map((report, idx) => (
|
||||||
<div key={idx} className="report-page bg-white" style={{ minHeight: '297mm' }}>
|
<div key={idx} className="report-page bg-white w-full h-auto">
|
||||||
<ReportDisplay report={report} />
|
<ReportDisplay report={report} />
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ export const ReportDisplay: React.FC<ReportDisplayProps> = ({ report }) => {
|
|||||||
const confidence = report?.confidence || 0;
|
const confidence = report?.confidence || 0;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="animate-fade-in w-full max-w-[210mm] mx-auto bg-white dark:bg-slate-900 shadow-xl print:shadow-none print:m-0 print:p-[8mm_12mm] p-[8mm] sm:p-[10mm_12mm] relative flex flex-col justify-between text-slate-800 dark:text-slate-200 border border-slate-200 dark:border-slate-800 rounded-lg print:rounded-none h-auto min-h-[297mm]">
|
<div className="animate-fade-in w-full max-w-[210mm] mx-auto bg-white dark:bg-slate-900 shadow-xl print:shadow-none print:m-0 print:p-[8mm_12mm] p-[8mm] sm:p-[10mm_12mm] relative flex flex-col justify-between text-slate-800 dark:text-slate-200 border border-slate-200 dark:border-slate-800 rounded-lg print:rounded-none h-auto">
|
||||||
|
|
||||||
{/* Cabeçalho (Header) */}
|
{/* Cabeçalho (Header) */}
|
||||||
<header className="border-b border-slate-100 dark:border-slate-800 pb-2.5">
|
<header className="border-b border-slate-100 dark:border-slate-800 pb-2.5">
|
||||||
|
|||||||
@@ -42,6 +42,13 @@
|
|||||||
* {
|
* {
|
||||||
-webkit-print-color-adjust: exact !important;
|
-webkit-print-color-adjust: exact !important;
|
||||||
print-color-adjust: exact !important;
|
print-color-adjust: exact !important;
|
||||||
|
animation: none !important;
|
||||||
|
transition: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.animate-fade-in {
|
||||||
|
opacity: 1 !important;
|
||||||
|
transform: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-main-content {
|
.app-main-content {
|
||||||
|
|||||||
Reference in New Issue
Block a user