diff --git a/src/email/EmailShell.tsx b/src/email/EmailShell.tsx index 22ea0ed..b30f972 100644 --- a/src/email/EmailShell.tsx +++ b/src/email/EmailShell.tsx @@ -11,6 +11,8 @@ import { Img, Preview, Link, + Row, + Column, } from '@react-email/components' import type { Brand } from './types' @@ -24,6 +26,45 @@ type EmailShellProps = { const DEFAULT_LOGO_PLACEHOLDER = 'https://dummyimage.com/120x40/0f172a/ffffff&text=Shitaye' +function IconMail() { + return ( + + ) +} + +function IconPhone() { + return ( + + ) +} + +function ContactLine({ + icon, + children, +}: { + icon: ReactNode + children: ReactNode +}) { + return ( + + + {icon} + + {children} + + ) +} + export function EmailShell({ brand, title, previewText, children }: EmailShellProps) { const logoUrl = brand.logoUrl?.trim() ? brand.logoUrl.trim() : DEFAULT_LOGO_PLACEHOLDER @@ -58,16 +99,43 @@ export function EmailShell({ brand, title, previewText, children }: EmailShellPr
- - {brand.footer.address ? `${brand.footer.address} ` : ''} - {brand.footer.email ? `\u2709 ${brand.footer.email}` : ''} - +
+ {brand.footer.address ? ( + + {brand.footer.address} + + ) : null} - - {brand.footer.phone1 ? `\u260E ${brand.footer.phone1}` : ''} - {brand.footer.phone1 && brand.footer.phone2 ? ' · ' : ''} - {brand.footer.phone2 ? brand.footer.phone2 : ''} - + {brand.footer.email ? ( + }> + + + {brand.footer.email} + + + + ) : null} + + {brand.footer.phone1 || brand.footer.phone2 ? ( + }> + + {brand.footer.phone1 ? brand.footer.phone1 : ''} + {brand.footer.phone1 && brand.footer.phone2 ? ' · ' : ''} + {brand.footer.phone2 ? brand.footer.phone2 : ''} + + + ) : null} +