Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BD email #39

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
133 changes: 133 additions & 0 deletions content-samples/react/emails/magic-links/novu-happyBirthday.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
import {
Body,
Container,
Head,
Heading,
Hr,
Html,
Img,
Preview,
Section,
Text,
Link,
} from "@react-email/components";
import * as React from "react";

interface BirthdayEmailProps {
name?: string;
}

export const BirthdayEmail = ({ name }: BirthdayEmailProps) => (
<Html>
<Head>
<Link
href="https://fonts.googleapis.com/css2?family=Pacifico&family=Nunito:wght@400;700&display=swap"
rel="stylesheet"
/>
<style>{`
.background {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
}
`}</style>
</Head>
<Preview>Happy Birthday, Hodaya! 🎉</Preview>
<Body style={main}>
<Container style={container}>
<Img
className="background"
src="https://i.gifer.com/W9k1.gif"
alt="Confetti Background"
/>
<Img
src={`https://images.spr.so/cdn-cgi/imagedelivery/j42No7y-dcokJuNgXeA0ig/dca73b36-cf39-4e28-9bc7-8a0d0cd8ac70/standalone-gradient2x_2/w=128,quality=90,fit=scale-down`}
width={48}
height={48}
alt="Novu"
/>
<Heading style={heading}>Happy Birthday, Hodaya! 🎂🚀</Heading>
<Section style={body}>
<Text style={paragraph}>
May your code be bug-free and your ideas groundbreaking! Here's to
another year of creating and innovating for a better world.
</Text>
<Text style={paragraph}>Keep coding, keep inspiring!</Text>
</Section>
<Text style={paragraph}>
Best wishes,
<br />- The Novu Team
</Text>
<Hr style={hr} />
<Img
src={`https://images.spr.so/cdn-cgi/imagedelivery/j42No7y-dcokJuNgXeA0ig/dca73b36-cf39-4e28-9bc7-8a0d0cd8ac70/standalone-gradient2x_2/w=128,quality=90,fit=scale-down`}
width={32}
height={32}
style={{
WebkitFilter: "grayscale(100%)",
filter: "grayscale(100%)",
margin: "20px 0",
}}
/>
<Text style={footer}>Novu Technologies Inc.</Text>
<Text style={footer}>
2093 Philadelphia Pike #3222, Claymont, DE 19703
</Text>
</Container>
</Body>
</Html>
);

BirthdayEmail.PreviewProps = {
name: "Amazing Developer",
} as BirthdayEmailProps;

export default BirthdayEmail;

const main: React.CSSProperties = {
backgroundColor: "rgba(255, 255, 255, 0.8)",
fontFamily: "'Nunito', sans-serif",
position: "relative",
minHeight: "100vh",
};

const container: React.CSSProperties = {
margin: "0 auto",
padding: "20px 25px 48px",
position: "relative",
};

const heading: React.CSSProperties = {
fontFamily: "'Pacifico', cursive",
fontSize: "32px",
fontWeight: "normal",
marginTop: "48px",
color: "#FF6363",
textAlign: "center",
};

const body: React.CSSProperties = {
margin: "24px 0",
};

const paragraph: React.CSSProperties = {
fontSize: "18px",
lineHeight: "26px",
textAlign: "center",
};

const hr: React.CSSProperties = {
borderColor: "#dddddd",
marginTop: "48px",
};

const footer: React.CSSProperties = {
color: "#8898aa",
fontSize: "12px",
marginLeft: "4px",
textAlign: "center",
};

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import * as React from "react";
interface NovuVerifyEmailProps {
verificationCode?: string;
}

const baseUrl = process.env.VERCEL_URL
? `https://${process.env.VERCEL_URL}`
: "";
Expand Down
19 changes: 10 additions & 9 deletions content-samples/react/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions content-samples/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
},
"dependencies": {
"@react-email/components": "0.0.18",
"react-email": "2.1.4",
"react": "^18.2.0"
"react": "^18.2.0",
"react-email": "2.1.4"
},
"devDependencies": {
"@types/node": "^22.5.4",
"@types/react": "18.2.33",
"@types/react-dom": "18.2.14"
}
Expand Down
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.