| 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 ExpenseSentToClientEmailProps { |
| 14 | currency: string |
| 15 | expenseCount: number |
| 16 | orgSlug: string |
| 17 | projectName: string |
| 18 | projectSlug: string |
| 19 | recipientName: string |
| 20 | senderName: string |
| 21 | totalAmount: string |
| 22 | } |
| 23 | |
| 24 | export default function ExpenseSentToClientEmail |
| 25 | recipientName = 'Client' |
| 26 | senderName = 'John Doe' |
| 27 | projectName = 'Website Redesign' |
| 28 | expenseCount = 3, |
| 29 | totalAmount = '$149.97' |
| 30 | currency = 'USD' |
| 31 | orgSlug = 'acme' |
| 32 | projectSlug = 'website-redesign' |
| 33 | }: ExpenseSentToClientEmailProps) |
| 34 | return ( |
| 35 | <EmailLayout |
| 36 | accentColor='#2563eb' |
| 37 | heading='Expenses for review' |
| 38 | preview={`${expenseCount |
| 39 | > |
| 40 | <Text style={ |
| 41 | Hi {recipientName}, <span |
| 42 | you {expenseCount} expense{expenseCount |
| 43 | <span style={text |
| 44 | </Text> |
| 45 | <Section style={ |
| 46 | <Text style={ |
| 47 | <Text style={ |
| 48 | </Section> |
| 49 | <InfoCard> |
| 50 | <InfoRow label=' |
| 51 | <InfoRow |
| 52 | label='Expenses' |
| 53 | value={`${expenseCount |
| 54 | /> |
| 55 | <InfoRow label=' |
| 56 | </InfoCard> |
| 57 | <ActionButton |
| 58 | color='#2563eb' |
| 59 | href={`${baseUrl |
| 60 | > |
| 61 | Review Expenses |
| 62 | </ActionButton> |
| 63 | </EmailLayout> |
| 64 | ) |
| 65 | } |
| 66 | |
| 67 | const amountSection = { |
| 68 | textAlign: 'center' as |
| 69 | padding: '20px 0 8px', |
| 70 | } |
| 71 | |
| 72 | const amountLabel = { |
| 73 | fontSize: '13px', |
| 74 | color: '#71717a', |
| 75 | fontWeight: '500' as |
| 76 | margin: '0 0 4px', |
| 77 | textAlign: 'center' as |
| 78 | textTransform: 'uppercase' as |
| 79 | letterSpacing: '0.5px', |
| 80 | } |