| 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 InvoiceUnpaidEmailProps { |
| 14 | currency: string |
| 15 | invoiceId: string |
| 16 | invoiceNumber: string |
| 17 | markedByName: string |
| 18 | orgSlug: string |
| 19 | projectName: string |
| 20 | projectSlug: string |
| 21 | recipientName: string |
| 22 | totalAmount: string |
| 23 | } |
| 24 | |
| 25 | export default function InvoiceUnpaidEmail |
| 26 | invoiceNumber = 'INV-2026-001' |
| 27 | projectName = 'Website Redesign' |
| 28 | markedByName = 'Jane Smith' |
| 29 | totalAmount = '2,500.00' |
| 30 | currency = 'USD' |
| 31 | orgSlug = 'acme' |
| 32 | projectSlug = 'website-redesign' |
| 33 | invoiceId = 'inv_abc123' |
| 34 | }: InvoiceUnpaidEmailProps) |
| 35 | return ( |
| 36 | <EmailLayout |
| 37 | accentColor='#f59e0b' |
| 38 | heading='Invoice marked as unpaid' |
| 39 | preview={`Invoice ${invoiceNumber |
| 40 | > |
| 41 | <Text style={ |
| 42 | <span style={text |
| 43 | <span style={text |
| 44 | {projectName}. Payment is still required. |
| 45 | </Text> |
| 46 | <Section style={ |
| 47 | <Text style={ |
| 48 | <Text style={ |
| 49 | </Section> |
| 50 | <InfoCard> |
| 51 | <InfoRow label=' |
| 52 | <InfoRow label=' |
| 53 | </InfoCard> |
| 54 | <ActionButton |
| 55 | color='#f59e0b' |
| 56 | href={`${baseUrl |
| 57 | > |
| 58 | View Invoice |
| 59 | </ActionButton> |
| 60 | </EmailLayout> |
| 61 | ) |
| 62 | } |
| 63 | |
| 64 | const amountSection = { |
| 65 | textAlign: 'center' as |
| 66 | padding: '20px 0 8px', |
| 67 | } |
| 68 | |
| 69 | const currencyLabel = { |
| 70 | fontSize: '13px', |
| 71 | color: '#71717a', |
| 72 | fontWeight: '500' as |
| 73 | margin: '0 0 4px', |
| 74 | textAlign: 'center' as |
| 75 | } |