9
9
Preview ,
10
10
Text ,
11
11
} from '@react-email/components' ;
12
+ import { Tailwind } from '@react-email/tailwind' ;
12
13
13
14
interface NotionMagicLinkEmailProps {
14
15
loginCode ?: string ;
@@ -23,65 +24,54 @@ export const NotionMagicLinkEmail = ({
23
24
} : NotionMagicLinkEmailProps ) => (
24
25
< Html >
25
26
< Head />
26
- < Body style = { main } >
27
- < Preview > Log in with this magic link</ Preview >
28
- < Container style = { container } >
29
- < Heading style = { h1 } > Login</ Heading >
30
- < Link
31
- href = "https://notion.so"
32
- target = "_blank"
33
- style = { {
34
- ...link ,
35
- display : 'block' ,
36
- marginBottom : '16px' ,
37
- } }
38
- >
39
- Click here to log in with this magic link
40
- </ Link >
41
- < Text style = { { ...text , marginBottom : '14px' } } >
42
- Or, copy and paste this temporary login code:
43
- </ Text >
44
- < code style = { code } > { loginCode } </ code >
45
- < Text
46
- style = { {
47
- ...text ,
48
- color : '#ababab' ,
49
- marginTop : '14px' ,
50
- marginBottom : '16px' ,
51
- } }
52
- >
53
- If you didn't try to login, you can safely ignore this email.
54
- </ Text >
55
- < Text
56
- style = { {
57
- ...text ,
58
- color : '#ababab' ,
59
- marginTop : '12px' ,
60
- marginBottom : '38px' ,
61
- } }
62
- >
63
- Hint: You can set a permanent password in Settings & members → My
64
- account .
65
- </ Text >
66
- < Img
67
- src = { `${ baseUrl } /static/notion-logo.png` }
68
- width = "32"
69
- height = "32"
70
- alt = "Notion's Logo"
71
- />
72
- < Text style = { footer } >
27
+ < Body className = "bg-white" >
28
+ < Tailwind >
29
+ < Preview > Log in with this magic link</ Preview >
30
+ < Container className = "px-3 mx-auto" >
31
+ < Heading className = "font-sans text-2xl font-bold text-[#333] my-10 p-0" >
32
+ Login
33
+ </ Heading >
73
34
< Link
74
35
href = "https://notion.so"
75
36
target = "_blank"
76
- style = { { ... link , color : '#898989' } }
37
+ className = "text-[#2754C5] font-sans text-sm underline block mb-4"
77
38
>
78
- Notion.so
39
+ Click here to log in with this magic link
79
40
</ Link >
80
- , the all-in-one-workspace
81
- < br />
82
- for your notes, tasks, wikis, and databases.
83
- </ Text >
84
- </ Container >
41
+ < Text className = "text-[#333] font-sans text-sm my-6 mb-3.5" >
42
+ Or, copy and paste this temporary login code:
43
+ </ Text >
44
+ < code className = "inline-block py-4 px-[4.5%] w-[90.5%] bg-[#f4f4f4] rounded-md border border-[#eee] text-[#333]" >
45
+ { loginCode }
46
+ </ code >
47
+
48
+ < Text className = "text-[#ababab] mt-3.5 mb-4 font-sans text-sm" >
49
+ If you didn't try to login, you can safely ignore this email.
50
+ </ Text >
51
+ < Text className = "text-[#ababab] mt-3 mb-[38px] font-sans text-sm" >
52
+ Hint: You can set a permanent password in Settings & members → My
53
+ account .
54
+ </ Text >
55
+ < Img
56
+ src = { `${ baseUrl } /static/notion-logo.png` }
57
+ width = "32"
58
+ height = "32"
59
+ alt = "Notion's Logo"
60
+ />
61
+ < Text className = "text-[#898989] mt-3 mb-[22px] font-sans text-sm" >
62
+ < Link
63
+ className = "text-[#898989] underline font-sans text-sm"
64
+ href = "https://notion.so"
65
+ target = "_blank"
66
+ >
67
+ Notion.so
68
+ </ Link >
69
+ , the all-in-one-workspace
70
+ < br />
71
+ for your notes, tasks, wikis, and databases.
72
+ </ Text >
73
+ </ Container >
74
+ </ Tailwind >
85
75
</ Body >
86
76
</ Html >
87
77
) ;
@@ -91,59 +81,3 @@ NotionMagicLinkEmail.PreviewProps = {
91
81
} as NotionMagicLinkEmailProps ;
92
82
93
83
export default NotionMagicLinkEmail ;
94
-
95
- const main = {
96
- backgroundColor : '#ffffff' ,
97
- } ;
98
-
99
- const container = {
100
- paddingLeft : '12px' ,
101
- paddingRight : '12px' ,
102
- margin : '0 auto' ,
103
- } ;
104
-
105
- const h1 = {
106
- color : '#333' ,
107
- fontFamily :
108
- "-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif" ,
109
- fontSize : '24px' ,
110
- fontWeight : 'bold' ,
111
- margin : '40px 0' ,
112
- padding : '0' ,
113
- } ;
114
-
115
- const link = {
116
- color : '#2754C5' ,
117
- fontFamily :
118
- "-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif" ,
119
- fontSize : '14px' ,
120
- textDecoration : 'underline' ,
121
- } ;
122
-
123
- const text = {
124
- color : '#333' ,
125
- fontFamily :
126
- "-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif" ,
127
- fontSize : '14px' ,
128
- margin : '24px 0' ,
129
- } ;
130
-
131
- const footer = {
132
- color : '#898989' ,
133
- fontFamily :
134
- "-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif" ,
135
- fontSize : '12px' ,
136
- lineHeight : '22px' ,
137
- marginTop : '12px' ,
138
- marginBottom : '24px' ,
139
- } ;
140
-
141
- const code = {
142
- display : 'inline-block' ,
143
- padding : '16px 4.5%' ,
144
- width : '90.5%' ,
145
- backgroundColor : '#f4f4f4' ,
146
- borderRadius : '5px' ,
147
- border : '1px solid #eee' ,
148
- color : '#333' ,
149
- } ;
0 commit comments