From 1e383b5ba847dafb1f0c32244f3e852c13969888 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Ckirukib=E2=80=9D?= <“kirubeljkl679@gmail.com”> Date: Thu, 2 Apr 2026 11:29:29 +0300 Subject: [PATCH] structured contact footer Made-with: Cursor --- src/email/EmailShell.tsx | 86 +++++++++++++++++++++++++++++++++++----- 1 file changed, 77 insertions(+), 9 deletions(-) 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} +