@@ -17,66 +17,23 @@ import {
17
17
import type * as React from 'react' ;
18
18
19
19
interface NetlifyWelcomeEmailProps {
20
- steps ? : {
20
+ steps : {
21
21
id : number ;
22
22
Description : React . ReactNode ;
23
23
} [ ] ;
24
- links ?: string [ ] ;
24
+ links : {
25
+ title : string ;
26
+ href : string ;
27
+ } [ ] ;
25
28
}
26
29
27
30
const baseUrl = process . env . VERCEL_URL
28
31
? `https://${ process . env . VERCEL_URL } `
29
32
: '' ;
30
33
31
- const PropDefaults : NetlifyWelcomeEmailProps = {
32
- steps : [
33
- {
34
- id : 1 ,
35
- Description : (
36
- < li className = "mb-20" key = { 1 } >
37
- < strong > Deploy your first project.</ strong > { ' ' }
38
- < Link > Connect to Git, choose a template</ Link > , or manually deploy a
39
- project you've been working on locally.
40
- </ li >
41
- ) ,
42
- } ,
43
- {
44
- id : 2 ,
45
- Description : (
46
- < li className = "mb-20" key = { 2 } >
47
- < strong > Check your deploy logs.</ strong > Find out what's included in
48
- your build and watch for errors or failed deploys.{ ' ' }
49
- < Link > Learn how to read your deploy logs</ Link > .
50
- </ li >
51
- ) ,
52
- } ,
53
- {
54
- id : 3 ,
55
- Description : (
56
- < li className = "mb-20" key = { 3 } >
57
- < strong > Choose an integration.</ strong > Quickly discover, connect, and
58
- configure the right tools for your project with 150+ integrations to
59
- choose from. < Link > Explore the Integrations Hub</ Link > .
60
- </ li >
61
- ) ,
62
- } ,
63
- {
64
- id : 4 ,
65
- Description : (
66
- < li className = "mb-20" key = { 4 } >
67
- < strong > Set up a custom domain.</ strong > You can register a new domain
68
- and buy it through Netlify or assign a domain you already own to your
69
- site. < Link > Add a custom domain</ Link > .
70
- </ li >
71
- ) ,
72
- } ,
73
- ] ,
74
- links : [ 'Visit the forums' , 'Read the docs' , 'Contact an expert' ] ,
75
- } ;
76
-
77
34
export const NetlifyWelcomeEmail = ( {
78
- steps = PropDefaults . steps ,
79
- links = PropDefaults . links ,
35
+ steps,
36
+ links,
80
37
} : NetlifyWelcomeEmailProps ) => {
81
38
return (
82
39
< Html >
@@ -135,9 +92,12 @@ export const NetlifyWelcomeEmail = ({
135
92
< Section className = "mt-45" >
136
93
< Row >
137
94
{ links ?. map ( ( link ) => (
138
- < Column key = { link } >
139
- < Link className = "text-black underline font-bold" >
140
- { link }
95
+ < Column key = { link . title } >
96
+ < Link
97
+ className = "text-black underline font-bold"
98
+ href = { link . href }
99
+ >
100
+ { link . title }
141
101
</ Link > { ' ' }
142
102
< span className = "text-green-500" > →</ span >
143
103
</ Column >
@@ -167,4 +127,57 @@ export const NetlifyWelcomeEmail = ({
167
127
) ;
168
128
} ;
169
129
130
+ NetlifyWelcomeEmail . PreviewProps = {
131
+ steps : [
132
+ {
133
+ id : 1 ,
134
+ Description : (
135
+ < li className = "mb-20" key = { 1 } >
136
+ < strong > Deploy your first project.</ strong > { ' ' }
137
+ < Link > Connect to Git, choose a template</ Link > , or manually deploy a
138
+ project you've been working on locally.
139
+ </ li >
140
+ ) ,
141
+ } ,
142
+ {
143
+ id : 2 ,
144
+ Description : (
145
+ < li className = "mb-20" key = { 2 } >
146
+ < strong > Check your deploy logs.</ strong > Find out what's included in
147
+ your build and watch for errors or failed deploys.{ ' ' }
148
+ < Link > Learn how to read your deploy logs</ Link > .
149
+ </ li >
150
+ ) ,
151
+ } ,
152
+ {
153
+ id : 3 ,
154
+ Description : (
155
+ < li className = "mb-20" key = { 3 } >
156
+ < strong > Choose an integration.</ strong > Quickly discover, connect, and
157
+ configure the right tools for your project with 150+ integrations to
158
+ choose from. < Link > Explore the Integrations Hub</ Link > .
159
+ </ li >
160
+ ) ,
161
+ } ,
162
+ {
163
+ id : 4 ,
164
+ Description : (
165
+ < li className = "mb-20" key = { 4 } >
166
+ < strong > Set up a custom domain.</ strong > You can register a new domain
167
+ and buy it through Netlify or assign a domain you already own to your
168
+ site. < Link > Add a custom domain</ Link > .
169
+ </ li >
170
+ ) ,
171
+ } ,
172
+ ] ,
173
+ links : [
174
+ {
175
+ title : 'Visit the forums' ,
176
+ href : 'https://www.netlify.com' ,
177
+ } ,
178
+ { title : 'Read the docs' , href : 'https://www.netlify.com' } ,
179
+ { title : 'Contact an expert' , href : 'https://www.netlify.com' } ,
180
+ ] ,
181
+ } satisfies NetlifyWelcomeEmailProps ;
182
+
170
183
export default NetlifyWelcomeEmail ;
0 commit comments