| 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 RepositoryInvitationProps { |
| 11 | name?: string |
| 12 | inviter: string; |
| 13 | repository: string; |
| 14 | role: string; |
| 15 | invitationsUrl: string; |
| 16 | appUrl: string; |
| 17 | } |
| 18 | |
| 19 | export default function RepositoryInvitation |
| 20 | name = 'there' |
| 21 | inviter = 'alice' |
| 22 | repository = 'alice/ghost' |
| 23 | role = 'write' |
| 24 | invitationsUrl = 'http://localhost:3000/dashboard' |
| 25 | appUrl = 'http://localhost:3000' |
| 26 | }: RepositoryInvitationProps) |
| 27 | return ( |
| 28 | <EmailLayout |
| 29 | appUrl={appUrl} |
| 30 | heading={`Join ${repository |
| 31 | preview={`${inviter |
| 32 | > |
| 33 | <Text style={ |
| 34 | Hi <span style={text |
| 35 | <span style={text |
| 36 | <span style={text |
| 37 | <span style={text |
| 38 | </Text> |
| 39 | <ActionButton href={ |
| 40 | <LinkFallback href={ |
| 41 | <Text style={ |
| 42 | Nothing changes until you accept. If you do not know {inviter}, decline |
| 43 | it or ignore this email. |
| 44 | </Text> |
| 45 | </EmailLayout> |
| 46 | ); |
| 47 | } |