| 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 ProposalSentEmailProps { |
| 14 | currency: string |
| 15 | organizationName: string |
| 16 | orgSlug: string |
| 17 | pricingType: string |
| 18 | proposalSlug: string |
| 19 | proposalTitle: string |
| 20 | recipientName: string |
| 21 | senderName: string |
| 22 | totalAmount: string |
| 23 | validUntil: string |
| 24 | } |
| 25 | |
| 26 | export default function ProposalSentEmail |
| 27 | recipientName = 'Jane Smith' |
| 28 | proposalTitle = 'E-Commerce Platform Rebuild' |
| 29 | organizationName = 'Acme Studio' |
| 30 | senderName = 'John Doe' |
| 31 | totalAmount = '15,000.00' |
| 32 | currency = 'USD' |
| 33 | pricingType = 'fixed' |
| 34 | validUntil = 'April 15, 2026' |
| 35 | orgSlug = 'acme' |
| 36 | proposalSlug = 'ecommerce-rebuild' |
| 37 | }: ProposalSentEmailProps) |
| 38 | return ( |
| 39 | <EmailLayout |
| 40 | accentColor='#7c3aed' |
| 41 | heading='You have a new proposal' |
| 42 | preview={`New proposal from ${organizationName |
| 43 | > |
| 44 | <Text style={ |
| 45 | Hi {recipientName}, <span |
| 46 | <span style={text |
| 47 | for your review. |
| 48 | </Text> |
| 49 | {totalAmount && ( |
| 50 | <Section style={ |
| 51 | <Text style={ |
| 52 | <Text style={ |
| 53 | </Section> |
| 54 | )} |
| 55 | <InfoCard> |
| 56 | <InfoRow label=' |
| 57 | <InfoRow |
| 58 | label='Pricing' |
| 59 | value={pricingType.charAt |
| 60 | /> |
| 61 | {validUntil && <InfoRow |
| 62 | </InfoCard> |
| 63 | <Text style={ |
| 64 | Review the proposal details and approve it, or request changes if |
| 65 | anything needs adjustment. |
| 66 | </Text> |
| 67 | <ActionButton href={ |
| 68 | View Proposal |
| 69 | </ActionButton> |
| 70 | </EmailLayout> |
| 71 | ) |
| 72 | } |
| 73 | |
| 74 | const amountSection = { |
| 75 | textAlign: 'center' as |
| 76 | padding: '20px 0 8px', |
| 77 | } |
| 78 | |
| 79 | const currencyLabel = { |
| 80 | fontSize: '13px', |
| 81 | color: '#71717a', |
| 82 | fontWeight: '500' as |
| 83 | margin: '0 0 4px', |
| 84 | textAlign: 'center' as |
| 85 | } |