|
| 1 | +import { |
| 2 | + Body, |
| 3 | + Button, |
| 4 | + Container, |
| 5 | + Font, |
| 6 | + Heading, |
| 7 | + Html, |
| 8 | + Preview, |
| 9 | + Section, |
| 10 | + Tailwind, |
| 11 | + Text, |
| 12 | +} from '@react-email/components'; |
| 13 | +import { Footer } from '../components/footer'; |
| 14 | +import { Logo } from '../components/logo'; |
| 15 | + |
| 16 | +interface Props { |
| 17 | + toName: string; |
| 18 | + organizationName: string; |
| 19 | + expiresAt: Date; |
| 20 | + portalUrl?: string | null; |
| 21 | +} |
| 22 | + |
| 23 | +export const AccessGrantedEmail = ({ |
| 24 | + toName, |
| 25 | + organizationName, |
| 26 | + expiresAt, |
| 27 | + portalUrl, |
| 28 | +}: Props) => { |
| 29 | + return ( |
| 30 | + <Html> |
| 31 | + <Tailwind> |
| 32 | + <head> |
| 33 | + <Font |
| 34 | + fontFamily="Geist" |
| 35 | + fallbackFontFamily="Helvetica" |
| 36 | + fontWeight={400} |
| 37 | + fontStyle="normal" |
| 38 | + /> |
| 39 | + <Font |
| 40 | + fontFamily="Geist" |
| 41 | + fallbackFontFamily="Helvetica" |
| 42 | + fontWeight={500} |
| 43 | + fontStyle="normal" |
| 44 | + /> |
| 45 | + </head> |
| 46 | + <Preview>Access Granted - {organizationName}</Preview> |
| 47 | + |
| 48 | + <Body className="mx-auto my-auto bg-[#fff] font-sans"> |
| 49 | + <Container |
| 50 | + className="mx-auto my-[40px] max-w-[600px] border-transparent p-[20px] md:border-[#E8E7E1]" |
| 51 | + style={{ borderStyle: 'solid', borderWidth: 1 }} |
| 52 | + > |
| 53 | + <Logo /> |
| 54 | + <Heading className="mx-0 my-[30px] p-0 text-center text-[24px] font-normal text-[#121212]"> |
| 55 | + Access Granted ✓ |
| 56 | + </Heading> |
| 57 | + |
| 58 | + <Text className="text-[14px] leading-[24px] text-[#121212]"> |
| 59 | + Hello {toName}, |
| 60 | + </Text> |
| 61 | + |
| 62 | + <Text className="text-[14px] leading-[24px] text-[#121212]"> |
| 63 | + Your NDA has been signed and your access to{' '} |
| 64 | + <strong>{organizationName}</strong>'s policy documentation is now |
| 65 | + active. |
| 66 | + </Text> |
| 67 | + |
| 68 | + <Text className="text-[14px] leading-[24px] text-[#121212]"> |
| 69 | + Your access will expire on:{' '} |
| 70 | + <strong> |
| 71 | + {expiresAt.toLocaleDateString('en-US', { |
| 72 | + year: 'numeric', |
| 73 | + month: 'long', |
| 74 | + day: 'numeric', |
| 75 | + })} |
| 76 | + </strong> |
| 77 | + </Text> |
| 78 | + |
| 79 | + {portalUrl && ( |
| 80 | + <Section className="mt-[32px] mb-[32px] text-center"> |
| 81 | + <Button |
| 82 | + className="rounded-[3px] bg-[#121212] px-[20px] py-[12px] text-center text-[14px] font-semibold text-white no-underline" |
| 83 | + href={portalUrl} |
| 84 | + > |
| 85 | + View Documents |
| 86 | + </Button> |
| 87 | + </Section> |
| 88 | + )} |
| 89 | + |
| 90 | + <Text className="text-[14px] leading-[24px] text-[#121212]"> |
| 91 | + You can download your signed NDA for your records from the |
| 92 | + confirmation page or by accessing the portal above. |
| 93 | + </Text> |
| 94 | + |
| 95 | + <Section |
| 96 | + className="mt-[30px] mb-[20px] rounded-[3px] border-l-4 p-[15px]" |
| 97 | + style={{ backgroundColor: '#f8f9fa', borderColor: '#121212' }} |
| 98 | + > |
| 99 | + <Text className="m-0 text-[14px] leading-[24px] text-[#121212]"> |
| 100 | + <strong>Lost your access link?</strong> |
| 101 | + <br /> |
| 102 | + Visit the trust portal and click "Already have access?" to |
| 103 | + receive a new access link via email. |
| 104 | + </Text> |
| 105 | + </Section> |
| 106 | + |
| 107 | + <br /> |
| 108 | + |
| 109 | + <Footer /> |
| 110 | + </Container> |
| 111 | + </Body> |
| 112 | + </Tailwind> |
| 113 | + </Html> |
| 114 | + ); |
| 115 | +}; |
| 116 | + |
| 117 | +export default AccessGrantedEmail; |
0 commit comments