Deploy Inicial do SteelCheck com Docker Build Automatizado
This commit is contained in:
@@ -3,22 +3,22 @@ import type { ReportData } from '../types';
|
||||
import { ReportDisplay } from './ReportDisplay';
|
||||
|
||||
interface PrintableReportProps {
|
||||
report: ReportData;
|
||||
reports: ReportData[];
|
||||
}
|
||||
|
||||
export const PrintableReport: React.FC<PrintableReportProps> = ({ report }) => {
|
||||
// To ensure the generated PDF is strictly in light mode, we can wrap it in a container
|
||||
// that forces light theme classes, but since html2canvas evaluates computed styles,
|
||||
// it's best to ensure it renders offscreen without "dark" class in its hierarchy.
|
||||
// The 'light' class can help if tailwind 'dark' strategy is class-based.
|
||||
export const PrintableReport: React.FC<PrintableReportProps> = ({ reports }) => {
|
||||
return (
|
||||
<div
|
||||
id="printable-report-container"
|
||||
data-report={JSON.stringify(report)}
|
||||
className="light bg-white text-slate-900"
|
||||
style={{ width: '210mm', minHeight: '297mm', background: 'white' }}
|
||||
data-report={JSON.stringify(reports)}
|
||||
className="light bg-white text-slate-900 flex flex-col gap-[20mm]"
|
||||
style={{ width: '210mm', background: 'white' }}
|
||||
>
|
||||
<ReportDisplay report={report} />
|
||||
{reports.map((report, idx) => (
|
||||
<div key={idx} className="report-page" style={{ minHeight: '297mm' }}>
|
||||
<ReportDisplay report={report} />
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user