Deploy Inicial do SteelCheck com Docker Build Automatizado
This commit is contained in:
@@ -16,6 +16,11 @@ export const exportAsPdf = async (elementId: string, fileName: string, action: '
|
||||
}
|
||||
|
||||
try {
|
||||
const isDark = document.documentElement.classList.contains('dark');
|
||||
if (isDark) {
|
||||
document.documentElement.classList.remove('dark');
|
||||
}
|
||||
|
||||
const pdf = new jsPDF({
|
||||
orientation: 'portrait',
|
||||
unit: 'mm',
|
||||
@@ -44,6 +49,10 @@ export const exportAsPdf = async (elementId: string, fileName: string, action: '
|
||||
pdf.addImage(imgData, 'JPEG', 0, 0, pdfWidth, pdfHeight);
|
||||
}
|
||||
|
||||
if (isDark) {
|
||||
document.documentElement.classList.add('dark');
|
||||
}
|
||||
|
||||
if (action === 'download') {
|
||||
pdf.save(`${fileName}.pdf`);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user