From a989624fe241a33c2f5309a50fbbf9e1b9394e4f 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:18:39 +0300 Subject: [PATCH] footer icons and social links Made-with: Cursor --- src/App.tsx | 4 -- src/brand/brandDefaults.ts | 7 ++ src/components/BrandEditor.tsx | 56 +++++++++++++++ src/email/EmailShell.tsx | 121 +++++++++++++++++++++++++++++++-- src/email/types.ts | 7 ++ 5 files changed, 186 insertions(+), 9 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index aad7090..e549f15 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -122,10 +122,6 @@ export default function App() { -
- -
-
) diff --git a/src/email/EmailShell.tsx b/src/email/EmailShell.tsx index 7afcec5..7e1defc 100644 --- a/src/email/EmailShell.tsx +++ b/src/email/EmailShell.tsx @@ -10,6 +10,7 @@ import { Hr, Img, Preview, + Link, } from '@react-email/components' import type { Brand } from './types' @@ -26,6 +27,71 @@ const DEFAULT_LOGO_PLACEHOLDER = export function EmailShell({ brand, title, previewText, children }: EmailShellProps) { const logoUrl = brand.logoUrl?.trim() ? brand.logoUrl.trim() : DEFAULT_LOGO_PLACEHOLDER + const phoneColor = brand.textColor + const iconColor = brand.primaryColor + + const IconPhone = () => ( + + + + ) + + const IconSocial = ({ kind }: { kind: 'facebook' | 'instagram' | 'x' | 'youtube' | 'linkedin' }) => { + const common = { stroke: iconColor, strokeWidth: 1.6, strokeLinecap: 'round' as const, strokeLinejoin: 'round' as const } + if (kind === 'facebook') { + return ( + + + + ) + } + if (kind === 'instagram') { + return ( + + + + + + ) + } + if (kind === 'x') { + return ( + + + + + ) + } + if (kind === 'youtube') { + return ( + + + + + ) + } + // linkedin + return ( + + + + + + ) + } + return ( @@ -61,11 +127,56 @@ export function EmailShell({ brand, title, previewText, children }: EmailShellPr {brand.footer.address ? `${brand.footer.address} ` : ''} {brand.footer.email ? `Email: ${brand.footer.email}` : ''} - - {brand.footer.phone1 ? `Tel: ${brand.footer.phone1}` : ''} - {brand.footer.phone1 && brand.footer.phone2 ? ' · ' : ''} - {brand.footer.phone2 ? `${brand.footer.phone2}` : ''} - + + {(brand.footer.phone1 || brand.footer.phone2) ? ( +
+
+ + + {brand.footer.phone1 ? `Tel: ${brand.footer.phone1}` : ''} + {brand.footer.phone1 && brand.footer.phone2 ? ' · ' : ''} + {brand.footer.phone2 ? `${brand.footer.phone2}` : ''} + +
+
+ ) : null} + + {/* Social icons */} + {brand.footer.social && + (brand.footer.social.facebookUrl || + brand.footer.social.instagramUrl || + brand.footer.social.xUrl || + brand.footer.social.youtubeUrl || + brand.footer.social.linkedinUrl) ? ( +
+ {brand.footer.social.facebookUrl ? ( + + + + ) : null} + {brand.footer.social.instagramUrl ? ( + + + + ) : null} + {brand.footer.social.xUrl ? ( + + + + ) : null} + {brand.footer.social.youtubeUrl ? ( + + + + ) : null} + {brand.footer.social.linkedinUrl ? ( + + + + ) : null} +
+ ) : null} + © {new Date().getFullYear()} {brand.hotelName}. All rights reserved. diff --git a/src/email/types.ts b/src/email/types.ts index 90162f0..fed4eb4 100644 --- a/src/email/types.ts +++ b/src/email/types.ts @@ -5,6 +5,13 @@ export type BrandFooter = { email?: string phone1?: string phone2?: string + social?: { + facebookUrl?: string + instagramUrl?: string + xUrl?: string + youtubeUrl?: string + linkedinUrl?: string + } } export type Brand = {