File tree Expand file tree Collapse file tree 1 file changed +71
-0
lines changed
components/email-templates Expand file tree Collapse file tree 1 file changed +71
-0
lines changed Original file line number Diff line number Diff line change
1
+ import {
2
+ Html ,
3
+ Preview ,
4
+ Body ,
5
+ Head ,
6
+ Text ,
7
+ Img ,
8
+ Row ,
9
+ Column ,
10
+ Link ,
11
+ Section ,
12
+ Heading ,
13
+ } from "@react-email/components"
14
+ import * as React from "react"
15
+ import { Tailwind } from "@react-email/tailwind"
16
+
17
+ type EmailWrapperProps = {
18
+ children : React . ReactNode
19
+ previewText : string
20
+ dir ?: "ltr" | "rtl"
21
+ }
22
+
23
+ const EmailWrapper = ( { children, previewText, dir } : EmailWrapperProps ) => {
24
+ return (
25
+ < Html lang = "en" dir = { dir } >
26
+ < Head >
27
+ < title > Pear AI | { previewText } </ title >
28
+ </ Head >
29
+ < Preview > { previewText as string } </ Preview >
30
+ < Tailwind >
31
+ < Body className = "mx-auto bg-gray-100 p-3" >
32
+ < Section className = "mx-auto mt-2 text-center" >
33
+ < Section className = "max-w-[180px]" >
34
+ < Column align = "right" >
35
+ < Link href = "https://trypear.ai" target = "_blank" >
36
+ { /* <Img
37
+ src={``} // emails supports only PNG images
38
+ width="35"
39
+ height="35"
40
+ alt="pearai-logo"
41
+ className="mx-auto"
42
+ style={{ marginTop: "-0.1rem" }}
43
+ /> */ }
44
+ LOGO HERE
45
+ </ Link >
46
+ </ Column >
47
+ < Column align = "center" >
48
+ < Heading as = "h2" > Pear AI</ Heading >
49
+ </ Column >
50
+ </ Section >
51
+ </ Section >
52
+
53
+ { children }
54
+
55
+ < Section className = "mx-auto mt-2 text-center" >
56
+ < Text className = "-mt-2 text-xs text-gray-500" > © 2023 Pear AI</ Text >
57
+ < Link
58
+ className = "-mt-4 text-xs text-blue-500 underline"
59
+ href = "https://trypear.ai"
60
+ target = "_blank"
61
+ >
62
+ Contact Us
63
+ </ Link >
64
+ </ Section >
65
+ </ Body >
66
+ </ Tailwind >
67
+ </ Html >
68
+ )
69
+ }
70
+
71
+ export default EmailWrapper
You can’t perform that action at this time.
0 commit comments