File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed
components/email-templates Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ import WelcomeTemplate from "./welcome-template"
2+
3+ export enum EmailTemplates {
4+ WELCOME = "WELCOME" ,
5+ }
6+
7+ export function SelectEmailTemplate ( data : any ) {
8+ switch ( data . template ) {
9+ case EmailTemplates . WELCOME :
10+ return WelcomeTemplate ( {
11+ userName : data . userName ,
12+ } )
13+
14+ // more templates here
15+ }
16+ }
Original file line number Diff line number Diff line change 1+ import React from "react"
2+ import EmailWrapper from "./email-wrapper"
3+ import { Container , Heading , Text } from "@react-email/components"
4+
5+ const WelcomeTemplate = ( { userName } : { userName : string } ) => {
6+ return (
7+ < EmailWrapper previewText = "Welcome to Pear AI" dir = "ltr" >
8+ < Container className = "mx-auto -mt-3 max-w-[600px] rounded-xl bg-white px-8 py-5" >
9+ < Heading as = "h1" > Hi { userName } ,</ Heading >
10+ < Heading as = "h2" > Welcome to Pear AI!</ Heading >
11+ < Text >
12+ We are excited to have you onboard and look forward to helping you get
13+ the most out of our product.
14+ </ Text >
15+ < Text >
16+ If you have any questions or need assistance, please don't hesitate to
17+ reach out to us.
18+ </ Text >
19+ </ Container >
20+ </ EmailWrapper >
21+ )
22+ }
23+
24+ export default WelcomeTemplate
You can’t perform that action at this time.
0 commit comments