infoalloggi-monorepo/apps/infoalloggi/emails/base.tsx

79 lines
1.5 KiB
TypeScript
Raw Normal View History

2025-08-04 17:45:44 +02:00
import {
2025-08-28 18:27:07 +02:00
Body,
Container,
Head,
Hr,
Html,
Img,
Preview,
Section,
Tailwind,
Text,
2025-08-04 17:45:44 +02:00
} from "@react-email/components";
import type { JSX } from "react";
2025-10-20 17:08:13 +02:00
import { env } from "~/env";
2025-08-04 17:45:44 +02:00
const Base = ({
2025-08-28 18:27:07 +02:00
children,
preview,
noreply,
2025-08-04 17:45:44 +02:00
}: {
2025-08-28 18:27:07 +02:00
children: JSX.Element;
preview: string;
noreply?: boolean;
2025-08-04 17:45:44 +02:00
}) => {
2025-08-28 18:27:07 +02:00
return (
<Tailwind
config={{
theme: {
container: {
center: true,
padding: "2rem",
screens: {
"2xl": "1400px",
},
},
},
}}
>
<Html>
<Head />
2025-08-04 17:45:44 +02:00
2025-08-28 18:27:07 +02:00
<Preview>{preview}</Preview>
<Body className="py-2 text-center font-sans text-base text-neutral-700">
<Container className="max-w-2xl rounded-lg border border-[#eaeaea] border-solid pt-2 pb-10">
2025-08-28 18:27:07 +02:00
<Img
alt="Logo Infoalloggi.it"
className="mx-auto my-2"
height={44}
src={`${env.BASE_URL}/Infoalloggi.png`}
width={230}
2025-08-28 18:27:07 +02:00
/>
2025-08-04 17:45:44 +02:00
<Section className="max-w-xl px-4">
2025-08-28 18:27:07 +02:00
<Hr />
<Section className="max-w-lg">{children}</Section>
2025-08-04 17:45:44 +02:00
2025-08-28 18:27:07 +02:00
<Section className="mt-4">
{noreply && (
2025-10-10 16:18:43 +02:00
<Text className="text-neutral-500 text-xs">
2025-08-28 18:27:07 +02:00
Questo è un messaggio automatico, per favore non rispondere
a questa email.
</Text>
)}
</Section>
<Section className="mt-3">
<Text className="text-left text-sm">
Arcenia S.r.l. Via Beata Giovanna 1, Bassano del Grappa (VI) -
tel: 0424529869
2025-08-28 18:27:07 +02:00
</Text>
</Section>
</Section>
</Container>
</Body>
</Html>
</Tailwind>
);
2025-08-04 17:45:44 +02:00
};
export default Base;