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

53 lines
1.6 KiB
TypeScript
Raw Normal View History

import { RECIPIENT_ROLES_DESCRIPTION } from '@documenso/lib/constants/recipient-roles';
import type { RecipientRole } from '@documenso/prisma/client';
2023-12-02 09:38:24 +11:00
import { Button, Section, Text } from '../components';
import { TemplateDocumentImage } from './template-document-image';
2023-08-07 23:10:27 +10:00
export interface TemplateDocumentInviteProps {
inviterName: string;
inviterEmail: string;
documentName: string;
signDocumentLink: string;
assetBaseUrl: string;
role: RecipientRole;
2023-08-07 23:10:27 +10:00
}
export const TemplateDocumentInvite = ({
inviterName,
documentName,
signDocumentLink,
assetBaseUrl,
role,
2023-08-07 23:10:27 +10:00
}: TemplateDocumentInviteProps) => {
const { actionVerb, progressiveVerb } = RECIPIENT_ROLES_DESCRIPTION[role];
2023-08-07 23:10:27 +10:00
return (
2023-12-02 09:38:24 +11:00
<>
<TemplateDocumentImage className="mt-6" assetBaseUrl={assetBaseUrl} />
<Section>
2023-08-07 23:10:27 +10:00
<Text className="text-primary mx-auto mb-0 max-w-[80%] text-center text-lg font-semibold">
{inviterName} has invited you to {actionVerb.toLowerCase()}
<br />"{documentName}"
2023-08-07 23:10:27 +10:00
</Text>
<Text className="my-1 text-center text-base text-slate-400">
Continue by {progressiveVerb.toLowerCase()} the document.
2023-08-07 23:10:27 +10:00
</Text>
<Section className="mb-6 mt-8 text-center">
<Button
className="bg-documenso-500 inline-flex items-center justify-center rounded-lg px-6 py-3 text-center text-sm font-medium text-black no-underline"
href={signDocumentLink}
>
{actionVerb} Document
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 TemplateDocumentInvite;