mirror of
https://github.com/documenso/documenso.git
synced 2026-06-22 04:12:06 +10:00
56 lines
1.9 KiB
TypeScript
56 lines
1.9 KiB
TypeScript
import { msg } from '@lingui/core/macro';
|
|
import { useLingui } from '@lingui/react';
|
|
|
|
import { Body, Container, Head, Html, Preview, Section } from '../components';
|
|
import { TemplateBrandingLogo } from '../template-components/template-branding-logo';
|
|
import type { TemplateDocumentCompletedProps } from '../template-components/template-document-completed';
|
|
import { TemplateDocumentCompleted } from '../template-components/template-document-completed';
|
|
import { TemplateFooter } from '../template-components/template-footer';
|
|
|
|
export type DocumentCompletedEmailTemplateProps = Partial<TemplateDocumentCompletedProps> & {
|
|
customBody?: string;
|
|
reportUrl?: string;
|
|
};
|
|
|
|
export const DocumentCompletedEmailTemplate = ({
|
|
downloadLink = 'https://documenso.com',
|
|
documentName = 'Open Source Pledge.pdf',
|
|
assetBaseUrl = 'http://localhost:3002',
|
|
customBody,
|
|
reportUrl,
|
|
}: DocumentCompletedEmailTemplateProps) => {
|
|
const { _ } = useLingui();
|
|
|
|
const previewText = msg`Completed Document`;
|
|
|
|
return (
|
|
<Html>
|
|
<Head />
|
|
<Preview>{_(previewText)}</Preview>
|
|
|
|
<Body className="mx-auto my-auto font-sans">
|
|
<Section className="bg-white">
|
|
<Container className="mx-auto mt-8 mb-2 max-w-xl rounded-lg border border-slate-200 border-solid p-2 backdrop-blur-sm">
|
|
<Section className="p-2">
|
|
<TemplateBrandingLogo assetBaseUrl={assetBaseUrl} className="mb-4 h-6" />
|
|
|
|
<TemplateDocumentCompleted
|
|
downloadLink={downloadLink}
|
|
documentName={documentName}
|
|
assetBaseUrl={assetBaseUrl}
|
|
customBody={customBody}
|
|
/>
|
|
</Section>
|
|
</Container>
|
|
|
|
<Container className="mx-auto max-w-xl">
|
|
<TemplateFooter reportUrl={reportUrl} />
|
|
</Container>
|
|
</Section>
|
|
</Body>
|
|
</Html>
|
|
);
|
|
};
|
|
|
|
export default DocumentCompletedEmailTemplate;
|