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; rewardAmount?: string; transactionAmount?: string; } export const ReferralSuccessEmail = ({ userName = 'Kirubel', referredUserName = 'Alex Martinez', referralCode = 'AMB-KIRU-2024', rewardAmount = '$10.00', transactionAmount = '$100.00', }: ReferralSuccessEmailProps) => { return (
Referral Reward Earned! 🎉 Hi {userName}, Excellent news! {referredUserName} has used your referral code {referralCode} to make a payment, and you've earned a reward!
Your Reward {rewardAmount} This reward has been automatically added to your account.
Referred By: {userName}
New User: {referredUserName}
Referral Code Used: {referralCode}
Transaction Amount: {transactionAmount}
Keep sharing your referral code with friends and family to earn more rewards! Every successful referral earns you {rewardAmount}.
Thank you for helping grow the Amba community! 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 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', }; 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', rewardAmount: '$10.00', transactionAmount: '$100.00', } as ReferralSuccessEmailProps; export default ReferralSuccessEmail;