import { Heading, Section, Text, } from '@react-email/components'; import { EmailLayout } from './components/EmailLayout'; import { Card } from './components/Card'; import { Button } from './components/Button'; import { theme } from './theme'; interface ReferralSuccessEmailProps { userName?: string; referredUserName?: string; referralCode?: string; pointsEarned?: number; transactionAmount?: string; } export const ReferralSuccessEmail = ({ userName = 'Kirubel', referredUserName = 'Alex Martinez', referralCode = 'AMB-KIRU-2024', pointsEarned = 100, transactionAmount = '$100.00', }: ReferralSuccessEmailProps) => { return (
You Earned Referral Points! 🎉 Hi {userName}, Excellent news! {referredUserName} created an account using your referral code {referralCode} and completed their first transaction. You've earned referral points!
Points Earned {pointsEarned} points These points have been automatically added to your account.
Referred User: {referredUserName}
Referral Code: {referralCode}
Transaction Completed: {transactionAmount}
Keep sharing your referral code with friends and family to earn more points! Every successful referral that creates an account and makes a transaction earns you points.
Thank you for helping grow the AmbaPay community! Best regards,
The AmbaPay 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 rewardSection = { textAlign: 'center' as const, padding: '20px 0', marginBottom: '20px', borderBottom: `2px solid ${theme.colors.accent}`, }; const rewardLabel = { color: theme.colors.text, fontSize: '14px', fontWeight: '600', margin: '0 0 8px', textTransform: 'uppercase' as const, letterSpacing: '1px', }; const rewardAmount = { color: theme.colors.primary, fontSize: '36px', fontWeight: '700', margin: '0 0 8px', display: 'inline-block', }; const rewardNote = { color: theme.colors.text, fontSize: '12px', margin: '0', fontStyle: 'italic', }; 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', }; const buttonSection = { textAlign: 'center' as const, margin: '32px 0', }; ReferralSuccessEmail.PreviewProps = { userName: 'Kirubel', referredUserName: 'Alex Martinez', referralCode: 'AMB-KIRU-2024', pointsEarned: 100, transactionAmount: '$100.00', } as ReferralSuccessEmailProps; export default ReferralSuccessEmail;