File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load diff This file was deleted.
Original file line number Diff line number Diff line change 1+ import {
2+ Body ,
3+ Button ,
4+ Container ,
5+ Head ,
6+ Heading ,
7+ Hr ,
8+ Html ,
9+ Preview ,
10+ Section ,
11+ Tailwind ,
12+ Text ,
13+ } from '@react-email/components' ;
14+ import { createIntl } from 'react-intl' ;
15+
16+ interface WelcomeProps {
17+ locale : 'pt' | 'en' ;
18+ name : string ;
19+ }
20+
21+ export async function Welcome ( { locale, name } : WelcomeProps ) {
22+ const { formatMessage } = createIntl ( {
23+ locale,
24+ messages : await import ( `../messages/${ locale } /welcome-email.json` ) ,
25+ } ) ;
26+
27+ return (
28+ < Html >
29+ < Head />
30+ < Preview > { formatMessage ( { id : 'header' } ) } </ Preview >
31+ < Tailwind >
32+ < Body className = "bg-gray-100 font-sans" >
33+ < Container className = "mx-auto py-10 px-5" >
34+ < Section className = "bg-white rounded-lg p-8" >
35+ < Heading className = "text-2xl font-bold text-gray-900 m-0 mb-6" >
36+ { formatMessage ( { id : 'header' } ) }
37+ </ Heading >
38+ < Text className = "text-base leading-6 text-gray-600 m-0 mb-4" >
39+ { formatMessage ( { id : 'hi' } ) } { name }
40+ </ Text >
41+ < Text className = "text-base leading-6 text-gray-600 m-0 mb-4" >
42+ { formatMessage ( { id : 'thanks' } ) }
43+ </ Text >
44+ < Button
45+ href = "https://example.com/dashboard"
46+ className = "bg-indigo-600 rounded-md text-white text-base font-semibold no-underline text-center block py-3 px-6 my-6"
47+ >
48+ { formatMessage ( { id : 'get-started' } ) }
49+ </ Button >
50+ < Hr className = "border-gray-200 my-6" />
51+ < Text className = "text-sm text-gray-400 m-0" >
52+ { formatMessage ( { id : 'questions' } ) }
53+ </ Text >
54+ </ Section >
55+ </ Container >
56+ </ Body >
57+ </ Tailwind >
58+ </ Html >
59+ ) ;
60+ }
61+
62+ export default Welcome ;
63+
64+ Welcome . PreviewProps = {
65+ name : 'John Lennon' ,
66+ locale : 'en' ,
67+ } ;
68+
Original file line number Diff line number Diff line change 1+ {
2+ "header" : " Welcome to Acme" ,
3+ "hi" : " Hi" ,
4+ "thanks" : " Thanks for signing up! We're excited to have you on board." ,
5+ "get-started" : " Get Started" ,
6+ "questions" : " If you have any questions, reply to this email. We're here to help!"
7+ }
Original file line number Diff line number Diff line change 1+ {
2+ "header" : " Bem-vindo à Acme" ,
3+ "hi" : " Olá" ,
4+ "thanks" : " Obrigado por se inscrever! Estamos animados em tê-lo conosco." ,
5+ "get-started" : " Começar" ,
6+ "questions" : " Se você tiver alguma dúvida, responda a este e-mail. Estamos aqui para ajudar!"
7+ }
You can’t perform that action at this time.
0 commit comments