2024-12-15 17:47:07 -05:00
|
|
|
|
import {
|
|
|
|
|
Body,
|
|
|
|
|
Container,
|
|
|
|
|
Head,
|
|
|
|
|
Heading,
|
|
|
|
|
Html,
|
|
|
|
|
Preview,
|
|
|
|
|
Section,
|
|
|
|
|
Text,
|
|
|
|
|
Tailwind
|
|
|
|
|
} from "@react-email/components";
|
|
|
|
|
import * as React from "react";
|
|
|
|
|
|
|
|
|
|
interface ResourceOTPCodeProps {
|
|
|
|
|
email?: string;
|
|
|
|
|
resourceName: string;
|
|
|
|
|
orgName: string;
|
|
|
|
|
otp: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const ResourceOTPCode = ({
|
|
|
|
|
email,
|
|
|
|
|
resourceName,
|
|
|
|
|
orgName: organizationName,
|
|
|
|
|
otp
|
|
|
|
|
}: ResourceOTPCodeProps) => {
|
|
|
|
|
const previewText = `Your one-time password for ${resourceName} is ready!`;
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<Html>
|
|
|
|
|
<Head />
|
|
|
|
|
<Preview>{previewText}</Preview>
|
|
|
|
|
<Tailwind
|
|
|
|
|
config={{
|
|
|
|
|
theme: {
|
|
|
|
|
extend: {
|
|
|
|
|
colors: {
|
|
|
|
|
primary: "#F97317"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<Body className="font-sans">
|
|
|
|
|
<Container className="bg-white border border-solid border-gray-200 p-6 max-w-lg mx-auto my-8 rounded-lg">
|
2024-12-30 23:41:06 -05:00
|
|
|
|
<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-12-15 17:47:07 -05:00
|
|
|
|
<Heading className="text-2xl font-semibold text-gray-800 text-center">
|
|
|
|
|
Your One-Time Password
|
|
|
|
|
</Heading>
|
|
|
|
|
<Text className="text-base text-gray-700 mt-4">
|
|
|
|
|
Hi {email || "there"},
|
|
|
|
|
</Text>
|
|
|
|
|
<Text className="text-base text-gray-700 mt-2">
|
|
|
|
|
You’ve requested a one-time password (OTP) to
|
|
|
|
|
authenticate with the resource{" "}
|
|
|
|
|
<strong>{resourceName}</strong> in{" "}
|
|
|
|
|
<strong>{organizationName}</strong>. Use the OTP
|
|
|
|
|
below to complete your authentication:
|
|
|
|
|
</Text>
|
2024-12-30 23:41:06 -05:00
|
|
|
|
<Section className="text-center">
|
2024-12-15 17:47:07 -05:00
|
|
|
|
<Text className="inline-block bg-primary text-xl font-bold text-white py-2 px-4 border border-gray-300 rounded-xl">
|
|
|
|
|
{otp}
|
|
|
|
|
</Text>
|
|
|
|
|
</Section>
|
2024-12-22 17:27:09 -05:00
|
|
|
|
<Text className="text-sm text-gray-500 mt-6">
|
|
|
|
|
Best regards,
|
|
|
|
|
<br />
|
|
|
|
|
Fossorial
|
|
|
|
|
</Text>
|
2024-12-15 17:47:07 -05:00
|
|
|
|
</Container>
|
|
|
|
|
</Body>
|
|
|
|
|
</Tailwind>
|
|
|
|
|
</Html>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default ResourceOTPCode;
|