import { Heading, Section, Text, Img, } from '@react-email/components'; import { EmailLayout } from './components/EmailLayout'; import { Card } from './components/Card'; import { Button } from './components/Button'; import { theme } from './theme'; interface EventTicketEmailProps { userName?: string; eventName?: string; eventDate?: string; eventTime?: string; venue?: string; ticketType?: string; amount?: string; qrCodeUrl?: string; ticketNumber?: string; } export const EventTicketEmail = ({ userName = 'Kirubel', eventName = 'Summer Music Festival 2024', eventDate = 'July 15, 2024', eventTime = '7:00 PM', venue = 'City Park Amphitheater', ticketType = 'General Admission', amount = '$75.00', qrCodeUrl = 'https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=EVENT-TICKET-12345', ticketNumber = 'EVT-12345', }: EventTicketEmailProps) => { return (
Your Event Ticket is Ready! 🎫 Hi {userName}, Thank you for your purchase! Your ticket for {eventName} has been confirmed. Please find your ticket details below.
{eventName}
Date: {eventDate}
Time: {eventTime}
Venue: {venue}
Ticket Type: {ticketType}
Ticket Number: {ticketNumber}
Amount Paid: {amount}
Your QR Code Ticket Present this QR code at the venue entrance for quick access:
QR Code
Save this email or take a screenshot for easy access at the event.
We're excited to see you at the event! 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 ticketInfo = { padding: '0', }; const eventTitle = { color: theme.colors.primary, fontSize: '20px', fontWeight: '700', margin: '0 0 20px', textAlign: 'center' as const, }; 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 qrSection = { textAlign: 'center' as const, margin: '32px 0', padding: '24px', backgroundColor: theme.colors.background, borderRadius: '8px', border: `2px solid ${theme.colors.accent}`, }; const qrTitle = { color: theme.colors.primary, fontSize: '18px', fontWeight: '600', margin: '0 0 8px', }; const qrInstructions = { color: theme.colors.textDark, fontSize: '14px', margin: '0 0 16px', }; const qrCodeContainer = { textAlign: 'center' as const, margin: '16px 0', }; const qrCode = { margin: '0 auto', border: `2px solid ${theme.colors.border}`, borderRadius: '8px', padding: '8px', backgroundColor: theme.colors.background, }; const qrNote = { color: theme.colors.text, fontSize: '12px', margin: '16px 0 0', fontStyle: 'italic', }; const buttonSection = { textAlign: 'center' as const, margin: '32px 0', }; EventTicketEmail.PreviewProps = { userName: 'Kirubel', eventName: 'Summer Music Festival 2024', eventDate: 'July 15, 2024', eventTime: '7:00 PM', venue: 'City Park Amphitheater', ticketType: 'General Admission', amount: '$75.00', qrCodeUrl: 'https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=EVENT-TICKET-12345', ticketNumber: 'EVT-12345', } as EventTicketEmailProps; export default EventTicketEmail;