Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Create program-welcome.tsx

Kiran Kdadeb8cce519
diff --git a/packages/email/src/templates/program-welcome.tsx b/packages/email/src/templates/program-welcome.tsx
new file mode 100644
index 0000000000..10dab4cb64
--- /dev/null
+++ b/packages/email/src/templates/program-welcome.tsx
@@ -0,0 +1,105 @@
+import {
+ DUB_LOGO,
+ DUB_THUMBNAIL,
+ DUB_WORDMARK,
+ getPrettyUrl,
+} from "@dub/utils";
+import {
+ Body,
+ Column,
+ Container,
+ Head,
+ Heading,
+ Html,
+ Img,
+ Link,
+ Preview,
+ Row,
+ Section,
+ Tailwind,
+ Text,
+} from "@react-email/components";
+import { Footer } from "../components/footer";
+
+export function ProgramWelcome({
+ email = "[email protected]",
+ program = {
+ name: "Acme",
+ logo: DUB_LOGO,
+ slug: "acme",
+ },
+}: {
+ email: string;
+ program: {
+ name: string;
+ logo: string | null;
+ slug: string;
+ };
+}) {
+ const programUrl = `https://partners.dub.co/${program.slug}`;
+
+ return (
+ <Html>
+ <Head />
+ <Preview>Congratulations on creating a program!</Preview>
+ <Tailwind>
+ <Body className="mx-auto my-auto bg-white font-sans">
+ <Container className="mx-auto my-10 max-w-[600px] px-10 py-5">
+ <Section className="mt-8">
+ <Img src={DUB_WORDMARK} height="32" alt="Dub" />
+ </Section>
+
+ <Heading
+ className="text-lg font-semibold leading-7 text-neutral-900"
+ mt="28"
+ >
+ Congratulations on creating a program!
+ </Heading>
+
+ <Text className="mt-5 text-sm leading-3 text-neutral-600">
+ Your program{" "}
+ <span className="font-semibold text-neutral-800">
+ {program.name}
+ </span>{" "}
+ is created and ready to share with your partners.
+ </Text>
+
+ <Section className="rounded-xl border border-solid border-neutral-200 bg-neutral-50 px-6 py-4">
+ <Row>
+ <Column width={10}>
+ <Img
+ src={program.logo || DUB_THUMBNAIL}
+ alt={program.name}
+ height="32"
+ width="32"
+ className="mr-4 rounded-md"
+ />
+ </Column>
+
+ <Column>
+ <Text className="m-0 text-base text-sm font-semibold text-neutral-800">
+ {program.name}
+ </Text>
+
+ <Link
+ href={programUrl}
+ className="m-0 text-xs font-medium text-neutral-800 underline"
+ >
+ {getPrettyUrl(programUrl)}
+ </Link>
+ </Column>
+ </Row>
+ </Section>
+
+
+
+
+ <Footer email={email} marketing />
+ </Container>
+ </Body>
+ </Tailwind>
+ </Html>
+ );
+}
+
+export default ProgramWelcome;