import { Heading, Section, Text } from '@react-email/components'; import { EmailLayout } from './components/EmailLayout'; import { Button } from './components/Button'; import { StatusBanner } from './components/StatusBanner'; import { styles } from './components/styles'; import { tCommon } from './i18n/common'; import { tTemplate } from './i18n/templates'; import { resolveLocale, type Locale } from './i18n/types'; import { interpolate } from './utils/interpolate'; import { theme } from './theme'; export interface PrescriptionSubmittedEmailProps { locale?: Locale; userName?: string; rxId?: string; ctaUrl?: string; } export const PrescriptionSubmittedEmail = ({ locale, userName = 'Abebe Kebede', rxId = 'RX-5521', ctaUrl = `${theme.brand.website}/prescriptions/${rxId}`, }: PrescriptionSubmittedEmailProps) => { const l = resolveLocale(locale); const t = tTemplate('prescription-submitted', l); const common = tCommon(l); return ( {t.banner} {t.heading} {interpolate(t.body1, { userName, rxId })}
{common.regards}
{common.team}
); }; PrescriptionSubmittedEmail.PreviewProps = { locale: 'en' } as PrescriptionSubmittedEmailProps; export default PrescriptionSubmittedEmail;