Skip to content

Commit 33d3ac1

Browse files
committed
Updates the magic link email
1 parent 7f83b93 commit 33d3ac1

File tree

1 file changed

+58
-30
lines changed

1 file changed

+58
-30
lines changed
Lines changed: 58 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,67 @@
1-
import { Body, Container, Head, Html, Link, Preview, Text } from "@react-email/components";
1+
import {
2+
Body,
3+
Button,
4+
Container,
5+
Hr,
6+
Html,
7+
Link,
8+
Preview,
9+
Section,
10+
Tailwind,
11+
Text,
12+
} from "@react-email/components";
213
import { Footer } from "./components/Footer";
314
import { Image } from "./components/Image";
4-
import { anchor, container, h1, main, paragraphLight } from "./components/styles";
15+
import { hr } from "./components/styles";
516

617
export default function Email({ magicLink }: { magicLink: string }) {
718
return (
819
<Html>
9-
<Head />
10-
<Preview>Log in with this magic link 🪄</Preview>
11-
<Body style={main}>
12-
<Container style={container}>
13-
<Text style={h1}>Log in to Trigger.dev</Text>
14-
<Link
15-
href={magicLink}
16-
target="_blank"
17-
style={{
18-
...anchor,
19-
display: "block",
20-
}}
21-
>
22-
Click here to log in with this magic link
23-
</Link>
24-
<Text
25-
style={{
26-
...paragraphLight,
27-
display: "block",
28-
marginBottom: "50px",
29-
}}
30-
>
31-
If you didn&apos;t try to log in, you can safely ignore this email.
32-
</Text>
33-
<Image path="/emails/logo-mono.png" width="120" height="22" alt="Trigger.dev" />
34-
<Footer />
35-
</Container>
36-
</Body>
20+
<Preview>Log in with this magic link</Preview>
21+
<Tailwind>
22+
<Body className="bg-[#121317] my-auto mx-auto font-sans">
23+
<Container className="my-[40px] mx-auto p-[20px] max-w-[600px]">
24+
<Section className="mt-[32px]">
25+
<Image
26+
path="/emails/logo.png"
27+
width="180px"
28+
height="32px"
29+
alt="Trigger.dev"
30+
className="mt-0 mb-12"
31+
/>
32+
<Text className="text-[24px] font-bold text-[#D7D9DD] mb-8">
33+
Log in to Trigger.dev
34+
</Text>
35+
<Button
36+
href={magicLink}
37+
className="bg-[#A8FF53] rounded text-[#121317] text-[16px] no-underline text-center px-4 py-3 mb-8"
38+
>
39+
Log in with magic link
40+
</Button>
41+
</Section>
42+
<Section className="mb-6">
43+
<Text className="text-[16px] text-[#878C99] inline">
44+
Can&apos;t see the button? Copy and paste this link into your browser:{" "}
45+
</Text>
46+
<Link
47+
href={magicLink}
48+
target="_blank"
49+
className="text-[#6366F1] text-[16px] block no-underline mt-1"
50+
>
51+
{magicLink}
52+
</Link>
53+
</Section>
54+
<Section>
55+
<Hr style={hr} />
56+
<Text className="text-[14px] mt-2 mb-0 text-[#878C99]">
57+
This link expires in 30 minutes and can only be used once. If you didn&apos;t try to
58+
log in, you can safely ignore this email.
59+
</Text>
60+
</Section>
61+
<Footer />
62+
</Container>
63+
</Body>
64+
</Tailwind>
3765
</Html>
3866
);
3967
}

0 commit comments

Comments
 (0)