import { Heading, Section, Text, } from '@react-email/components'; import { EmailLayout } from './components/EmailLayout'; import { Card } from './components/Card'; import { theme } from './theme'; interface TransactionCompleteEmailProps { userName?: string; amount?: string; transactionId?: string; recipient?: string; date?: string; } export const TransactionCompleteEmail = ({ userName = 'Kirubel', amount = '$150.00', transactionId = 'TXN-123456789', recipient = 'John Doe', date = new Date().toLocaleDateString(), }: TransactionCompleteEmailProps) => { return (
Transaction Complete! ✅ Hi {userName}, Your payment has been successfully processed. Here are the details:
Amount: {amount}
Recipient: {recipient}
Transaction ID: {transactionId}
Date: {date}
The funds have been transferred and the recipient has been notified. You can view this transaction in your transaction history at any time. If you have any questions or concerns about this transaction, please contact our support team. Best regards,
The Amba Team
); }; const heading = { color: theme.colors.primary, fontSize: '28px', fontWeight: '700', margin: '0 0 24px', }; const text = { color: theme.colors.textDark, fontSize: '16px', lineHeight: '24px', margin: '0 0 16px', }; const detailRow = { display: 'flex', justifyContent: 'space-between', marginBottom: '12px', paddingBottom: '12px', borderBottom: `1px solid ${theme.colors.border}`, }; const detailLabel = { color: theme.colors.text, fontSize: '14px', fontWeight: '600', margin: '0', flex: '1', }; const detailValue = { color: theme.colors.textDark, fontSize: '14px', margin: '0', textAlign: 'right' as const, flex: '1', }; TransactionCompleteEmail.PreviewProps = { userName: 'Kirubel', amount: '$150.00', transactionId: 'TXN-123456789', recipient: 'John Doe', date: new Date().toLocaleDateString(), } as TransactionCompleteEmailProps; export default TransactionCompleteEmail;