| 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 ChangeEmailProps { |
| 11 | name?: string |
| 12 | newEmail: string; |
| 13 | approveUrl: string; |
| 14 | appUrl: string; |
| 15 | } |
| 16 | |
| 17 | export default function ChangeEmail |
| 18 | name = 'there' |
| 19 | newEmail = 'new@example.com' |
| 20 | approveUrl = 'https://ghost.example/api/auth/change-email/callback?token=preview' |
| 21 | appUrl = 'http://localhost:3000' |
| 22 | }: ChangeEmailProps) |
| 23 | return ( |
| 24 | <EmailLayout |
| 25 | appUrl={appUrl} |
| 26 | heading="Approve your new email address" |
| 27 | preview="Approve the address change on your Ghost account" |
| 28 | > |
| 29 | <Text style={ |
| 30 | Hi <span style={text |
| 31 | move to <span style={text |
| 32 | here and that address becomes the one you sign in with. |
| 33 | </Text> |
| 34 | <ActionButton href={ |
| 35 | <LinkFallback href={ |
| 36 | <Text style={ |
| 37 | This mail goes to your current address on purpose, so a change can never |
| 38 | happen behind your back. If this was not you, ignore it and nothing |
| 39 | changes. |
| 40 | </Text> |
| 41 | </EmailLayout> |
| 42 | ); |
| 43 | } |