| 1 | import { Text } from '@react-email/components'; |
| 2 | |
| 3 | import { |
| 4 | ActionButton, |
| 5 | EmailLayout, |
| 6 | LinkFallback, |
| 7 | text, |
| 8 | } from '../components/layout.js'; |
| 9 | |
| 10 | interface OrganizationInvitationProps { |
| 11 | inviter: string; |
| 12 | organization: string; |
| 13 | role: string; |
| 14 | acceptUrl: string; |
| 15 | appUrl: string; |
| 16 | } |
| 17 | |
| 18 | export default function OrganizationInvitation |
| 19 | inviter = 'Alice' |
| 20 | organization = 'Acme' |
| 21 | role = 'write' |
| 22 | acceptUrl = 'http://localhost:3000/auth/accept-invitation?invitationId=preview' |
| 23 | appUrl = 'http://localhost:3000' |
| 24 | }: OrganizationInvitationProps) |
| 25 | return ( |
| 26 | <EmailLayout |
| 27 | appUrl={appUrl} |
| 28 | heading={`Join ${organization |
| 29 | preview={`${inviter |
| 30 | > |
| 31 | <Text style={ |
| 32 | <span style={text |
| 33 | <span style={text |
| 34 | <span style={text |
| 35 | organization's repositories. |
| 36 | </Text> |
| 37 | <ActionButton href={ |
| 38 | <LinkFallback href={ |
| 39 | <Text style={ |
| 40 | Nothing changes until you accept. If you do not know {inviter}, decline |
| 41 | it or ignore this email. |
| 42 | </Text> |
| 43 | </EmailLayout> |
| 44 | ); |
| 45 | } |