Some checks failed
Monorepo Pipeline / ⚡ Prioritize Release (push) Successful in 1s
Monorepo Pipeline / 🧹 Lint (push) Failing after 13s
Monorepo Pipeline / 🏗️ Build (push) Failing after 11s
Monorepo Pipeline / 🧪 Test (push) Failing after 25s
Monorepo Pipeline / 🚀 Release (push) Has been skipped
Monorepo Pipeline / 🐳 Build Directus (Base) (push) Has been skipped
Monorepo Pipeline / 🐳 Build Gatekeeper (Product) (push) Has been skipped
Monorepo Pipeline / 🐳 Build Build-Base (push) Has been skipped
Monorepo Pipeline / 🐳 Build Production Runtime (push) Has been skipped
56 lines
1.3 KiB
TypeScript
56 lines
1.3 KiB
TypeScript
'use client';
|
|
|
|
import * as React from 'react';
|
|
import { Page as PDFPage } from '@react-pdf/renderer';
|
|
import { FoldingMarks, Header, Footer, pdfStyles } from './SharedUI';
|
|
|
|
interface DINLayoutProps {
|
|
children: React.ReactNode;
|
|
sender?: string;
|
|
recipient?: {
|
|
title: string;
|
|
subtitle?: string;
|
|
address?: string;
|
|
phone?: string;
|
|
email?: string;
|
|
taxId?: string;
|
|
};
|
|
icon?: string;
|
|
footerLogo?: string;
|
|
companyData: any;
|
|
bankData: any;
|
|
showAddress?: boolean;
|
|
showFooterDetails?: boolean;
|
|
}
|
|
|
|
export const DINLayout = ({
|
|
children,
|
|
sender,
|
|
recipient,
|
|
icon,
|
|
footerLogo,
|
|
companyData,
|
|
bankData,
|
|
showAddress = true,
|
|
showFooterDetails = true
|
|
}: DINLayoutProps) => {
|
|
return (
|
|
<PDFPage size="A4" style={pdfStyles.page}>
|
|
<FoldingMarks />
|
|
<Header
|
|
sender={sender}
|
|
recipient={recipient}
|
|
icon={icon}
|
|
showAddress={showAddress}
|
|
/>
|
|
{children}
|
|
<Footer
|
|
logo={footerLogo}
|
|
companyData={companyData}
|
|
bankData={bankData}
|
|
showDetails={showFooterDetails}
|
|
/>
|
|
</PDFPage>
|
|
);
|
|
};
|