mirror of
https://github.com/documenso/documenso.git
synced 2026-06-22 04:12:06 +10:00
58 lines
1.7 KiB
TypeScript
58 lines
1.7 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 { TemplateDocumentRejected } from '../template-components/template-document-rejected';
|
|
import { TemplateFooter } from '../template-components/template-footer';
|
|
|
|
type DocumentRejectedEmailProps = {
|
|
recipientName: string;
|
|
documentName: string;
|
|
documentUrl: string;
|
|
rejectionReason: string;
|
|
assetBaseUrl?: string;
|
|
};
|
|
|
|
export function DocumentRejectedEmail({
|
|
recipientName,
|
|
documentName,
|
|
documentUrl,
|
|
rejectionReason,
|
|
assetBaseUrl = 'http://localhost:3002',
|
|
}: DocumentRejectedEmailProps) {
|
|
const { _ } = useLingui();
|
|
|
|
const previewText = _(msg`${recipientName} has rejected the document '${documentName}'`);
|
|
|
|
return (
|
|
<Html>
|
|
<Head />
|
|
<Preview>{previewText}</Preview>
|
|
|
|
<Body className="mx-auto my-auto bg-white font-sans">
|
|
<Section>
|
|
<Container className="mx-auto mt-8 mb-2 max-w-xl rounded-lg border border-slate-200 border-solid p-4 backdrop-blur-sm">
|
|
<Section>
|
|
<TemplateBrandingLogo assetBaseUrl={assetBaseUrl} className="mb-4 h-6" />
|
|
|
|
<TemplateDocumentRejected
|
|
recipientName={recipientName}
|
|
documentName={documentName}
|
|
documentUrl={documentUrl}
|
|
rejectionReason={rejectionReason}
|
|
/>
|
|
</Section>
|
|
</Container>
|
|
|
|
<Container className="mx-auto max-w-xl">
|
|
<TemplateFooter />
|
|
</Container>
|
|
</Section>
|
|
</Body>
|
|
</Html>
|
|
);
|
|
}
|
|
|
|
export default DocumentRejectedEmail;
|