1
- import { Heading , Section , Text } from "@react-email/components" ;
2
1
import { baseTemplate } from "./base.tsx" ;
3
- import { headingStyle } from "./styles.tsx " ;
2
+ import { sharedStyles } from "./sharedStyles.ts " ;
4
3
import type {
5
4
StripeBillingCycle ,
6
5
StripeProduct ,
@@ -20,47 +19,130 @@ const DowngradeEmail = (props: {
20
19
newSubscriptionDate : string ;
21
20
} ) => {
22
21
const previewText = "Confirmation of your subscription downgrade | NanoAPI" ;
22
+
23
23
return baseTemplate (
24
24
previewText ,
25
25
< >
26
- < Section >
27
- < Heading as = "h2" style = { headingStyle } >
28
- We are sorry to see you go
29
- </ Heading >
30
- < Text >
31
- Your subscription for workspace { props . workspaceName } { " " }
32
- has been scheduled for downgrade.
33
- </ Text >
34
- </ Section >
35
- < Section >
36
- < Text
37
- style = { { textAlign : "center" , fontSize : "20px" , fontWeight : "bold" } }
38
- >
39
- Previous subscription: { props . oldSubscription . product } { " " }
40
- ({ props . oldSubscription . billingCycle ?? "Custom billing cycle" } )
41
- </ Text >
42
- < Text
43
- style = { { textAlign : "center" , fontSize : "20px" , fontWeight : "bold" } }
26
+ { /* Header */ }
27
+ < div style = { { ...sharedStyles . centerText , ...sharedStyles . section } } >
28
+ < div style = { { ...sharedStyles . iconCircle , backgroundColor : "#6b7280" } } >
29
+ 📋
30
+ </ div >
31
+ < h1 style = { sharedStyles . heading } > Subscription Change Confirmed</ h1 >
32
+ < p style = { sharedStyles . body } >
33
+ Your subscription for < strong > "{ props . workspaceName } "</ strong > { " " }
34
+ has been updated
35
+ </ p >
36
+ </ div >
37
+
38
+ { /* Plan Comparison */ }
39
+ < div style = { { ...sharedStyles . section , ...sharedStyles . contentSpacing } } >
40
+ < h3 style = { { ...sharedStyles . subheading , ...sharedStyles . centerText } } >
41
+ Your Plan Changes
42
+ </ h3 >
43
+
44
+ < div style = { sharedStyles . card } >
45
+ < div style = { { marginBottom : "16px" } } >
46
+ < div
47
+ style = { {
48
+ ...sharedStyles . small ,
49
+ textTransform : "uppercase" ,
50
+ letterSpacing : "1px" ,
51
+ } }
52
+ >
53
+ Current Plan
54
+ </ div >
55
+ < div
56
+ style = { { fontSize : "20px" , fontWeight : "700" , color : "#166534" } }
57
+ >
58
+ { props . oldSubscription . product }
59
+ </ div >
60
+ < div style = { sharedStyles . small } >
61
+ { props . oldSubscription . billingCycle ?? "Custom billing cycle" }
62
+ </ div >
63
+ </ div >
64
+
65
+ < div
66
+ style = { {
67
+ textAlign : "center" ,
68
+ margin : "16px 0" ,
69
+ fontSize : "20px" ,
70
+ color : "#6b7280" ,
71
+ } }
72
+ >
73
+ ⬇️
74
+ </ div >
75
+
76
+ < div >
77
+ < div
78
+ style = { {
79
+ ...sharedStyles . small ,
80
+ textTransform : "uppercase" ,
81
+ letterSpacing : "1px" ,
82
+ } }
83
+ >
84
+ New Plan
85
+ </ div >
86
+ < div
87
+ style = { { fontSize : "20px" , fontWeight : "700" , color : "#991b1b" } }
88
+ >
89
+ { props . newSubscription . product }
90
+ </ div >
91
+ < div style = { sharedStyles . small } >
92
+ { props . newSubscription . billingCycle ?? "Custom billing cycle" }
93
+ </ div >
94
+ </ div >
95
+ </ div >
96
+ </ div >
97
+
98
+ { /* Effective Date */ }
99
+ < div
100
+ style = { { ...sharedStyles . warningBox , ...sharedStyles . contentSpacing } }
101
+ >
102
+ < h3
103
+ style = { {
104
+ ...sharedStyles . subheading ,
105
+ fontSize : "16px" ,
106
+ margin : "0 0 8px 0" ,
107
+ color : "#92400e" ,
108
+ } }
44
109
>
45
- New subscription: { props . newSubscription . product } { " " }
46
- ({ props . newSubscription . billingCycle ?? "Custom billing cycle" } )
47
- </ Text >
48
- < Text style = { { textAlign : "center" , fontWeight : "bold" } } >
49
- Effective date: { props . newSubscriptionDate }
50
- </ Text >
51
- </ Section >
52
- < Section >
53
- < Text >
110
+ Effective Date
111
+ </ h3 >
112
+ < p style = { { ...sharedStyles . small , color : "#92400e" , margin : 0 } } >
54
113
Your current subscription will remain active until the end of your
55
- billing period, and the new subscription will take effect on{ " " }
56
- { props . newSubscriptionDate } .
57
- </ Text >
58
- < Text >
59
- If you have any questions, please don't hesitate to contact our
60
- support team.
61
- </ Text >
62
- < Text > Best regards - Team Nano</ Text >
63
- </ Section >
114
+ billing period. The new subscription will take effect on{ " " }
115
+ < strong > { props . newSubscriptionDate } </ strong > .
116
+ </ p >
117
+ </ div >
118
+
119
+ { /* Support */ }
120
+ < div
121
+ style = { {
122
+ ...sharedStyles . card ,
123
+ ...sharedStyles . centerText ,
124
+ ...sharedStyles . contentSpacing ,
125
+ } }
126
+ >
127
+ < p style = { { ...sharedStyles . small , margin : 0 } } >
128
+ Have questions about your subscription change? Our{ " " }
129
+ < a href = "mailto:[email protected] " style = { sharedStyles . link } >
130
+ support team
131
+ </ a > { " " }
132
+ is here to help you.
133
+ </ p >
134
+ </ div >
135
+
136
+ { /* Footer */ }
137
+ < div style = { { ...sharedStyles . divider , ...sharedStyles . centerText } } >
138
+ < p style = { { ...sharedStyles . body , margin : "0 0 8px 0" } } >
139
+ Thank you for being part of our community! 🙏
140
+ </ p >
141
+ < p style = { sharedStyles . small } >
142
+ Best regards,< br />
143
+ The NanoAPI Team
144
+ </ p >
145
+ </ div >
64
146
</ > ,
65
147
) ;
66
148
} ;
0 commit comments