Skip to content

Commit 804750d

Browse files
committed
Merge branch 'main' into feat/vs-code-preview-ext
2 parents 150212d + 0d03f1c commit 804750d

File tree

434 files changed

+32718
-4177
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

434 files changed

+32718
-4177
lines changed

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
blank_issues_enabled: false
22
contact_links:
33
- name: Ask a question
4-
url: https://github.com/resendlabs/react-email/discussions
4+
url: https://github.com/resend/react-email/discussions
55
about: Ask questions and discuss with other community members
66
- name: Feature request
7-
url: https://github.com/resendlabs/react-email/discussions/new?category=ideas
7+
url: https://github.com/resend/react-email/discussions/new?category=ideas
88
about: Feature requests should be opened as discussions

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2022 Bu Kinoshita and Zeno Rocha
1+
Copyright 2024 Plus Five Five, Inc
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
44

README.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<div align="center">
77
<a href="https://react.email">Website</a>
88
<span> · </span>
9-
<a href="https://github.com/resendlabs/react-email">GitHub</a>
9+
<a href="https://github.com/resend/react-email">GitHub</a>
1010
<span> · </span>
1111
<a href="https://react.email/discord">Discord</a>
1212
</div>
@@ -27,27 +27,27 @@ Install one of the components from your command line.
2727
#### With yarn
2828

2929
```sh
30-
yarn add @react-email/button -E
30+
yarn add @react-email/components -E
3131
```
3232

3333
#### With npm
3434

3535
```sh
36-
npm install @react-email/button -E
36+
npm install @react-email/components -E
3737
```
3838

3939
#### With pnpm
4040

4141
```sh
42-
pnpm install @react-email/button -E
42+
pnpm install @react-email/components -E
4343
```
4444

4545
## Getting started
4646

4747
Add the component to your email template. Include styles where needed.
4848

4949
```jsx
50-
import { Button } from "@react-email/button";
50+
import { Button } from "@react-email/components";
5151

5252
const Email = () => {
5353
return (
@@ -62,30 +62,30 @@ const Email = () => {
6262

6363
A set of standard components to help you build amazing emails without having to deal with the mess of creating table-based layouts and maintaining archaic markup.
6464

65-
- [Html](https://github.com/resendlabs/react-email/tree/main/packages/html)
66-
- [Head](https://github.com/resendlabs/react-email/tree/main/packages/head)
67-
- [Heading](https://github.com/resendlabs/react-email/tree/main/packages/heading)
68-
- [Button](https://github.com/resendlabs/react-email/tree/main/packages/button)
69-
- [Link](https://github.com/resendlabs/react-email/tree/main/packages/link)
70-
- [Image](https://github.com/resendlabs/react-email/tree/main/packages/img)
71-
- [Divider](https://github.com/resendlabs/react-email/tree/main/packages/hr)
72-
- [Paragraph](https://github.com/resendlabs/react-email/tree/main/packages/text)
73-
- [Container](https://github.com/resendlabs/react-email/tree/main/packages/container)
74-
- [Preview](https://github.com/resendlabs/react-email/tree/main/packages/preview)
75-
- [Body](https://github.com/resendlabs/react-email/tree/main/packages/body)
76-
- [Column](https://github.com/resendlabs/react-email/tree/main/packages/column)
77-
- [Section](https://github.com/resendlabs/react-email/tree/main/packages/section)
78-
- [Font](https://github.com/resendlabs/react-email/tree/main/packages/font)
65+
- [Html](https://github.com/resend/react-email/tree/main/packages/html)
66+
- [Head](https://github.com/resend/react-email/tree/main/packages/head)
67+
- [Heading](https://github.com/resend/react-email/tree/main/packages/heading)
68+
- [Button](https://github.com/resend/react-email/tree/main/packages/button)
69+
- [Link](https://github.com/resend/react-email/tree/main/packages/link)
70+
- [Image](https://github.com/resend/react-email/tree/main/packages/img)
71+
- [Divider](https://github.com/resend/react-email/tree/main/packages/hr)
72+
- [Paragraph](https://github.com/resend/react-email/tree/main/packages/text)
73+
- [Container](https://github.com/resend/react-email/tree/main/packages/container)
74+
- [Preview](https://github.com/resend/react-email/tree/main/packages/preview)
75+
- [Body](https://github.com/resend/react-email/tree/main/packages/body)
76+
- [Column](https://github.com/resend/react-email/tree/main/packages/column)
77+
- [Section](https://github.com/resend/react-email/tree/main/packages/section)
78+
- [Font](https://github.com/resend/react-email/tree/main/packages/font)
7979

8080
## Integrations
8181

8282
Emails built with React Email can be converted into HTML and sent using any email service provider. Here are some examples:
8383

84-
- [Resend](https://github.com/resendlabs/react-email/tree/main/examples/resend)
85-
- [Nodemailer](https://github.com/resendlabs/react-email/tree/main/examples/nodemailer)
86-
- [SendGrid](https://github.com/resendlabs/react-email/tree/main/examples/sendgrid)
87-
- [Postmark](https://github.com/resendlabs/react-email/tree/main/examples/postmark)
88-
- [AWS SES](https://github.com/resendlabs/react-email/tree/main/examples/aws-ses)
84+
- [Resend](https://github.com/resend/react-email/tree/main/examples/resend)
85+
- [Nodemailer](https://github.com/resend/react-email/tree/main/examples/nodemailer)
86+
- [SendGrid](https://github.com/resend/react-email/tree/main/examples/sendgrid)
87+
- [Postmark](https://github.com/resend/react-email/tree/main/examples/postmark)
88+
- [AWS SES](https://github.com/resend/react-email/tree/main/examples/aws-ses)
8989

9090
## Support
9191

File renamed without changes.

apps/demo/emails/airbnb-review.tsx

Lines changed: 198 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,198 @@
1+
import {
2+
Body,
3+
Button,
4+
Container,
5+
Head,
6+
Hr,
7+
Html,
8+
Img,
9+
Link,
10+
Preview,
11+
Row,
12+
Section,
13+
Text,
14+
} from "@react-email/components";
15+
import * as React from "react";
16+
17+
interface AirbnbReviewEmailProps {
18+
authorName?: string;
19+
authorImage?: string;
20+
reviewText?: string;
21+
}
22+
23+
const baseUrl = process.env.VERCEL_URL
24+
? `https://${process.env.VERCEL_URL}`
25+
: "";
26+
27+
export const AirbnbReviewEmail = ({
28+
authorName,
29+
authorImage,
30+
reviewText,
31+
}: AirbnbReviewEmailProps) => {
32+
const previewText = `Read ${authorName}'s review`;
33+
34+
return (
35+
<Html>
36+
<Head />
37+
<Preview>{previewText}</Preview>
38+
39+
<Body style={main}>
40+
<Container style={container}>
41+
<Section>
42+
<Img
43+
src={`${baseUrl}/static/airbnb-logo.png`}
44+
width="96"
45+
height="30"
46+
alt="Airbnb"
47+
/>
48+
</Section>
49+
<Section>
50+
<Img
51+
src={authorImage}
52+
width="96"
53+
height="96"
54+
alt={authorName}
55+
style={userImage}
56+
/>
57+
</Section>
58+
<Section style={{ paddingBottom: "20px" }}>
59+
<Row>
60+
<Text style={heading}>Here's what {authorName} wrote</Text>
61+
<Text style={review}>{reviewText}</Text>
62+
<Text style={paragraph}>
63+
Now that the review period is over, we’ve posted {authorName}
64+
’s review to your Airbnb profile.
65+
</Text>
66+
<Text style={{ ...paragraph, paddingBottom: "16px" }}>
67+
While it’s too late to write a review of your own, you can send
68+
your feedback to {authorName} using your Airbnb message thread.
69+
</Text>
70+
71+
<Button style={button} href="https://airbnb.com/">
72+
Send My Feedback
73+
</Button>
74+
</Row>
75+
</Section>
76+
77+
<Hr style={hr} />
78+
79+
<Section>
80+
<Row>
81+
<Text style={{ ...paragraph, fontWeight: "700" }}>
82+
Common questions
83+
</Text>
84+
<Text>
85+
<Link href="https://airbnb.com/help/article/13" style={link}>
86+
How do reviews work?
87+
</Link>
88+
</Text>
89+
<Text>
90+
<Link href="https://airbnb.com/help/article/1257" style={link}>
91+
How do star ratings work?
92+
</Link>
93+
</Text>
94+
<Text>
95+
<Link href="https://airbnb.com/help/article/995" style={link}>
96+
Can I leave a review after 14 days?
97+
</Link>
98+
</Text>
99+
<Hr style={hr} />
100+
<Text style={footer}>
101+
Airbnb, Inc., 888 Brannan St, San Francisco, CA 94103
102+
</Text>
103+
<Link href="https://airbnb.com" style={reportLink}>
104+
Report unsafe behavior
105+
</Link>
106+
</Row>
107+
</Section>
108+
</Container>
109+
</Body>
110+
</Html>
111+
);
112+
};
113+
114+
AirbnbReviewEmail.PreviewProps = {
115+
authorName: "Alex",
116+
authorImage: `${baseUrl}/static/airbnb-review-user.jpg`,
117+
reviewText: `“Alan was a great guest! Easy communication, the apartment was left
118+
in great condition, very polite, and respectful of all house rules.
119+
He’s welcome back anytime and would easily recommend him to any
120+
host!”`,
121+
} as AirbnbReviewEmailProps;
122+
123+
export default AirbnbReviewEmail;
124+
125+
const main = {
126+
backgroundColor: "#ffffff",
127+
fontFamily:
128+
'-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif',
129+
};
130+
131+
const container = {
132+
margin: "0 auto",
133+
padding: "20px 0 48px",
134+
width: "580px",
135+
maxWidth: "100%",
136+
};
137+
138+
const userImage = {
139+
margin: "0 auto",
140+
marginBottom: "16px",
141+
borderRadius: "50%",
142+
};
143+
144+
const heading = {
145+
fontSize: "32px",
146+
lineHeight: "1.3",
147+
fontWeight: "700",
148+
color: "#484848",
149+
};
150+
151+
const paragraph = {
152+
fontSize: "18px",
153+
lineHeight: "1.4",
154+
color: "#484848",
155+
};
156+
157+
const review = {
158+
...paragraph,
159+
padding: "24px",
160+
backgroundColor: "#f2f3f3",
161+
borderRadius: "4px",
162+
};
163+
164+
const button = {
165+
backgroundColor: "#ff5a5f",
166+
borderRadius: "3px",
167+
color: "#fff",
168+
fontSize: "18px",
169+
paddingTop: "19px",
170+
paddingBottom: "19px",
171+
textDecoration: "none",
172+
textAlign: "center" as const,
173+
display: "block",
174+
width: "100%",
175+
};
176+
177+
const link = {
178+
...paragraph,
179+
color: "#ff5a5f",
180+
display: "block",
181+
};
182+
183+
const reportLink = {
184+
fontSize: "14px",
185+
color: "#9ca299",
186+
textDecoration: "underline",
187+
};
188+
189+
const hr = {
190+
borderColor: "#cccccc",
191+
margin: "20px 0",
192+
};
193+
194+
const footer = {
195+
color: "#9ca299",
196+
fontSize: "14px",
197+
marginBottom: "10px",
198+
};

demo/emails/amazon-review.tsx renamed to apps/demo/emails/amazon-review.tsx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const baseUrl = process.env.VERCEL_URL
2727

2828
export const AmazonReviewEmail = ({
2929
titleText = "Your opinion is important!",
30-
reviewText = "Zeno Rocha, do you have a moment? We would like to know if everything went well for you. Take a moment to review your most recent purchases.",
30+
reviewText = "Alan Turing, do you have a moment? We would like to know if everything went well for you. Take a moment to review your most recent purchases.",
3131
reviwStars = Array(5).fill(`${baseUrl}/static/amazon-rating.gif`),
3232
socialMediaIcons = [
3333
`${baseUrl}/static/amazon-instagram.jpg`,
@@ -83,8 +83,13 @@ export const AmazonReviewEmail = ({
8383
</Text>
8484
<Text>Start with rating this product</Text>
8585

86-
{reviwStars.map((star) => (
87-
<Img src={star} alt="Amazon Rating" style={rating} />
86+
{reviwStars.map((star, index) => (
87+
<Img
88+
key={index}
89+
src={star}
90+
alt="Amazon Rating"
91+
style={rating}
92+
/>
8893
))}
8994

9095
<Text>
@@ -120,8 +125,9 @@ export const AmazonReviewEmail = ({
120125
</Column>
121126

122127
<Column align="right">
123-
{socialMediaIcons.map((src) => (
128+
{socialMediaIcons.map((src, index) => (
124129
<Img
130+
key={index}
125131
src={src}
126132
alt="Amazon Social Midia"
127133
width="30"
@@ -143,7 +149,7 @@ export const AmazonReviewEmail = ({
143149
We hope this message was helpful to you. However, if you prefer
144150
not to receive this type of communication from{" "}
145151
<Link style={urlLink}>Amazon.com</Link> at{" "}
146-
<Link style={urlLink}>zenorocha@gmail.com </Link>,{" "}
152+
<Link style={urlLink}>alanturing@gmail.com </Link>,{" "}
147153
<Link style={clickHereLink}>click here</Link> .
148154
</Text>
149155
<Text style={footerText}>

demo/emails/apple-receipt.tsx renamed to apps/demo/emails/apple-receipt.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export const AppleReceiptEmail = () => (
6565
textDecoration: "underline",
6666
}}
6767
>
68-
zeno.rocha@gmail.com
68+
alan.turing@gmail.com
6969
</Link>
7070
</Column>
7171
</Row>
@@ -102,7 +102,7 @@ export const AppleReceiptEmail = () => (
102102
<Text style={informationTableValue}>
103103
Visa .... 7461 (Apple Pay)
104104
</Text>
105-
<Text style={informationTableValue}>Zeno Rocha</Text>
105+
<Text style={informationTableValue}>Alan Turing</Text>
106106
<Text style={informationTableValue}>2125 Chestnut St</Text>
107107
<Text style={informationTableValue}>San Francisco, CA 94123</Text>
108108
<Text style={informationTableValue}>USA</Text>
@@ -312,6 +312,7 @@ const container = {
312312
margin: "0 auto",
313313
padding: "20px 0 48px",
314314
width: "660px",
315+
maxWidth: "100%",
315316
};
316317

317318
const tableCell = { display: "table-cell" };

0 commit comments

Comments
 (0)