| 1 | import { Section, Text } from '@react-email/components' |
| 2 | import { env } |
| 3 | import { |
| 4 | ActionButton, |
| 5 | EmailLayout, |
| 6 | InfoCard, |
| 7 | InfoRow, |
| 8 | text, |
| 9 | } from '../components/layout' |
| 10 | |
| 11 | const baseUrl = env |
| 12 | |
| 13 | interface InvoicePaidEmailProps { |
| 14 | currency: string |
| 15 | invoiceId: string |
| 16 | invoiceNumber: string |
| 17 | orgSlug: string |
| 18 | paidAt: string |
| 19 | paidByName: string |
| 20 | projectName: string |
| 21 | projectSlug: string |
| 22 | recipientName: string |
| 23 | totalAmount: string |
| 24 | } |
| 25 | |
| 26 | export default function InvoicePaidEmail |
| 27 | invoiceNumber = 'INV-2026-001' |
| 28 | projectName = 'Website Redesign' |
| 29 | paidByName = 'Jane Smith' |
| 30 | totalAmount = '2,500.00' |
| 31 | currency = 'USD' |
| 32 | paidAt = 'March 10, 2026 at 3:45 PM' |
| 33 | orgSlug = 'acme' |
| 34 | projectSlug = 'website-redesign' |
| 35 | invoiceId = 'inv_abc123' |
| 36 | }: InvoicePaidEmailProps) |
| 37 | return ( |
| 38 | <EmailLayout |
| 39 | accentColor='#16a34a' |
| 40 | heading='Invoice paid' |
| 41 | preview={`Invoice ${invoiceNumber |
| 42 | > |
| 43 | <Text style={ |
| 44 | <span style={text |
| 45 | <span style={text |
| 46 | {projectName}. |
| 47 | </Text> |
| 48 | <Section style={ |
| 49 | <Text style={ |
| 50 | <Text style={ |
| 51 | </Section> |
| 52 | <InfoCard> |
| 53 | <InfoRow label=' |
| 54 | <InfoRow label=' |
| 55 | </InfoCard> |
| 56 | <ActionButton |
| 57 | color='#16a34a' |
| 58 | href={`${baseUrl |
| 59 | > |
| 60 | View Invoice |
| 61 | </ActionButton> |
| 62 | </EmailLayout> |
| 63 | ) |
| 64 | } |
| 65 | |
| 66 | const amountSection = { |
| 67 | textAlign: 'center' as |
| 68 | padding: '20px 0 8px', |
| 69 | } |
| 70 | |
| 71 | const currencyLabel = { |
| 72 | fontSize: '13px', |
| 73 | color: '#71717a', |
| 74 | fontWeight: '500' as |
| 75 | margin: '0 0 4px', |
| 76 | textAlign: 'center' as |
| 77 | } |