fosrl.pangolin/server/emails/templates/VerifyEmailCode.tsx

87 lines
2.9 KiB
TypeScript
Raw Normal View History

2024-10-03 20:55:54 -04:00
import {
Body,
Container,
Head,
Heading,
Html,
Preview,
Section,
Text,
2024-12-25 15:54:32 -05:00
Tailwind
2024-10-03 20:55:54 -04:00
} from "@react-email/components";
import * as React from "react";
interface VerifyEmailProps {
username?: string;
verificationCode: string;
2024-11-28 00:11:13 -05:00
verifyLink: string;
2024-10-03 20:55:54 -04:00
}
export const VerifyEmail = ({
username,
verificationCode,
2024-12-25 15:54:32 -05:00
verifyLink
2024-10-03 20:55:54 -04:00
}: VerifyEmailProps) => {
const previewText = `Verify your email, ${username}`;
return (
<Html>
<Head />
<Preview>{previewText}</Preview>
2024-11-28 00:11:13 -05:00
<Tailwind
config={{
theme: {
extend: {
colors: {
2024-12-25 15:54:32 -05:00
primary: "#F97317"
}
}
}
2024-11-28 00:11:13 -05:00
}}
>
2024-10-03 20:55:54 -04:00
<Body className="font-sans">
2024-11-28 00:11:13 -05:00
<Container className="bg-white border border-solid border-gray-200 p-6 max-w-lg mx-auto my-8 rounded-lg">
<div className="flex items-center justify-between">
<div className="text-sm font-bold text-orange-500">
Pangolin
</div>
<div className="text-sm text-gray-500">
{new Date().toLocaleDateString()}
</div>
</div>
2024-10-03 20:55:54 -04:00
<Heading className="text-2xl font-semibold text-gray-800 text-center">
Please Verify Your Email
2024-10-03 20:55:54 -04:00
</Heading>
<Text className="text-base text-gray-700 mt-4">
Hi {username || "there"},
</Text>
<Text className="text-base text-gray-700 mt-2">
2024-12-25 15:54:32 -05:00
Youve requested to verify your email. Please use
the code below to complete the verification process
upon logging in.
2024-10-03 20:55:54 -04:00
</Text>
<Section className="text-center">
2024-11-28 00:11:13 -05:00
<Text className="inline-block bg-primary text-xl font-bold text-white py-2 px-4 border border-gray-300 rounded-xl">
2024-10-03 20:55:54 -04:00
{verificationCode}
</Text>
</Section>
<Text className="text-base text-gray-700 mt-2">
If you didnt request this, you can safely ignore
this email.
</Text>
2024-12-22 17:27:09 -05:00
<Text className="text-sm text-gray-500 mt-6">
Best regards,
<br />
Fossorial
</Text>
2024-10-03 20:55:54 -04:00
</Container>
</Body>
</Tailwind>
</Html>
);
};
2024-11-28 00:11:13 -05:00
export default VerifyEmail;