Created
July 16, 2024 14:59
-
-
Save AlecRust/cc714d5d25a2cd153477aaeb22d7126a to your computer and use it in GitHub Desktop.
React Email Contact Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from "react"; | |
import { | |
Tailwind, | |
Body, | |
Container, | |
Head, | |
Html, | |
Preview, | |
Section, | |
Text, | |
} from "@react-email/components"; | |
import Header from "./Header"; | |
import Footer from "./Footer"; | |
interface ContactMessageProps { | |
name: string; | |
email: string; | |
message: string; | |
} | |
export default function ContactMessage({ | |
name, | |
email, | |
message, | |
}: ContactMessageProps) { | |
return ( | |
<Html lang="en"> | |
<Head /> | |
<Preview>New SimuHire Contact Message</Preview> | |
<Tailwind> | |
<Body className="bg-gray-100 py-5 font-sans"> | |
<Container className="max-w-2xl rounded-lg bg-white px-10 pb-2 pt-10"> | |
<Header /> | |
<Section> | |
<Text className="text-base text-gray-800"> | |
<strong>Name:</strong> {name} | |
</Text> | |
<Text className="text-base text-gray-800"> | |
<strong>Email:</strong> {email} | |
</Text> | |
<Text className="text-base text-gray-800"> | |
<strong>Message:</strong> | |
</Text> | |
<Text className="mb-5 text-base text-gray-600">{message}</Text> | |
</Section> | |
<Footer /> | |
</Container> | |
</Body> | |
</Tailwind> | |
</Html> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment