import { Body } from '@react-email/body'; import { Font } from '@react-email/font'; import { Head } from '@react-email/head'; import { Hr } from '@react-email/hr'; import { Html } from '@react-email/html'; import { Img } from '@react-email/img'; import { Preview } from '@react-email/preview'; import { Text } from '@react-email/text'; import { day } from '@vrplatform/utils'; import { VRP_PLATFORM } from '../const'; import type { EmailBaseProps } from '../types'; type Props = { children: React.ReactNode; title: string; tenant: Omit & { name?: string }; mode: EmailBaseProps['mode']; shortDescription?: string; unsubscribeHref?: string; }; export const EmailContainer = (props: Props) => { const { children, shortDescription, title } = props; const contentWrapperStyle = { paddingInline: '20px', paddingBlock: '10px', maxWidth: '500px', margin: '0 auto', }; if (props.mode !== 'send') { return (
{children}
); } return ( {title} {shortDescription && {shortDescription}} {children} ); }; const Content = ({ children, tenant: { logo: tenantLogo, name, showPlatformBranding = true }, mode, unsubscribeHref, }: Props) => { return ( <> {tenantLogo ? (
{'Logo'}
) : !showPlatformBranding ? ( {name} ) : mode === 'send' ? ( {'Logo'} ) : (
)} {children} {showPlatformBranding ?