feat: add ssr email templates rendering

This commit is contained in:
Ahmed Bouhuolia
2024-11-19 17:14:13 +02:00
parent f7bf24acb3
commit c6db54175f
7 changed files with 138 additions and 41 deletions

View File

@@ -0,0 +1,49 @@
import { x } from '@xstyled/emotion';
import { Stack, StackProps } from '@/components';
interface SendMailReceiptProps extends StackProps {
children: React.ReactNode;
}
export function SendMailReceipt({
children,
...restProps
}: SendMailReceiptProps) {
return (
<Stack
bg="white"
w={'100%'}
maxWidth={'500px'}
p={'35px 25px'}
borderRadius={'5px'}
boxShadow={'0 10px 15px rgba(0, 0, 0, 0.05)'}
color={'black'}
{...restProps}
></Stack>
);
}
interface SendMailReceiptCompanyLogoProps extends StackProps {
src: string;
}
function SendMailReceiptCompanyLogo({
src,
...props
}: SendMailReceiptCompanyLogoProps) {
return (
<x.div
h="90px"
w="90px"
mx="auto"
borderRadius="3px"
backgroundRepeat="no-repeat"
backgroundPosition="center center"
backgroundSize="contain"
backgroundImage={`url("${src}")`}
{...props}
></x.div>
);
}
SendMailReceipt.CompanyLogo = SendMailReceiptCompanyLogo;