Files
sign/packages/email/template-components/template-document-completed.tsx

66 lines
1.9 KiB
TypeScript
Raw Normal View History

import { Trans } from '@lingui/macro';
2023-12-02 09:38:24 +11:00
import { Button, Column, Img, Section, Text } from '../components';
import { TemplateDocumentImage } from './template-document-image';
2023-08-07 23:10:27 +10:00
export interface TemplateDocumentCompletedProps {
downloadLink: string;
documentName: string;
assetBaseUrl: string;
customBody?: string;
2023-08-07 23:10:27 +10:00
}
export const TemplateDocumentCompleted = ({
downloadLink,
documentName,
assetBaseUrl,
customBody,
2023-08-07 23:10:27 +10:00
}: TemplateDocumentCompletedProps) => {
const getAssetUrl = (path: string) => {
return new URL(path, assetBaseUrl).toString();
};
return (
2023-12-02 09:38:24 +11:00
<>
<TemplateDocumentImage className="mt-6" assetBaseUrl={assetBaseUrl} />
<Section>
<Section className="mb-4">
<Column align="center">
<Text className="text-base font-semibold text-[#7AC455]">
<Img
src={getAssetUrl('/static/completed.png')}
className="-mt-0.5 mr-2 inline h-7 w-7 align-middle"
/>
<Trans>Completed</Trans>
</Text>
</Column>
</Section>
2023-08-07 23:10:27 +10:00
<Text className="text-primary mb-0 text-center text-lg font-semibold">
2024-11-08 00:33:48 +09:00
{customBody || <Trans>{documentName} was signed by all signers</Trans>}
2023-08-07 23:10:27 +10:00
</Text>
<Text className="my-1 text-center text-base text-slate-400">
<Trans>Continue by downloading the document.</Trans>
2023-08-07 23:10:27 +10:00
</Text>
<Section className="mb-6 mt-8 text-center">
<Button
className="rounded-lg border border-solid border-slate-200 px-4 py-2 text-center text-sm font-medium text-black no-underline"
2023-08-07 23:10:27 +10:00
href={downloadLink}
>
<Img
src={getAssetUrl('/static/download.png')}
className="mb-0.5 mr-2 inline h-5 w-5 align-middle"
/>
<Trans>Download</Trans>
2023-08-07 23:10:27 +10:00
</Button>
</Section>
</Section>
2023-12-02 09:38:24 +11:00
</>
2023-08-07 23:10:27 +10:00
);
};
export default TemplateDocumentCompleted;