Guest User

Untitled

a guest
Feb 10th, 2024
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.38 KB | None | 0 0
  1. import {
  2. Body,
  3. Container,
  4. Head,
  5. Heading,
  6. Html,
  7. Img,
  8. Link,
  9. Preview,
  10. Text,
  11. } from "@react-email/components";
  12. import * as React from "react";
  13.  
  14. interface NotionMagicLinkEmailProps {
  15. actionLabel: string,
  16. href: string
  17. }
  18.  
  19. const baseUrl = process.env.VERCEL_URL
  20. ? `https://${process.env.NEXT_PUBLIC_SERVER_URL}`
  21. : "";
  22.  
  23. const PrimaryActionEmail = ({
  24. actionLabel,
  25. href
  26. }: NotionMagicLinkEmailProps) => (
  27. <Html>
  28. <Head />
  29. <Preview>Log in with this magic link</Preview>
  30. <Body style={main}>
  31. <Container style={container}>
  32. <Heading style={h1}>Login</Heading>
  33. <Link
  34. href={href}
  35. target="_blank"
  36. style={{
  37. ...link,
  38. display: "block",
  39. marginBottom: "16px",
  40. }}
  41. >
  42. {actionLabel}
  43. </Link>
  44. <Text
  45. style={{
  46. ...text,
  47. color: "#ababab",
  48. marginTop: "14px",
  49. marginBottom: "16px",
  50. }}
  51. >
  52. If you didn&apos;t try to login, you can safely ignore this email.
  53. </Text>
  54. <Text
  55. style={{
  56. ...text,
  57. color: "#ababab",
  58. marginTop: "12px",
  59. marginBottom: "38px",
  60. }}
  61. >
  62. Hint: You can check your playtime by going on your profile!
  63. </Text>
  64. <Img
  65. src={`${baseUrl}/static/notion-logo.png`}
  66. width="32"
  67. height="32"
  68. alt="Notion's Logo"
  69. />
  70. <Text style={footer}>
  71. <Link
  72. href="https://notion.so"
  73. target="_blank"
  74. style={{ ...link, color: "#898989" }}
  75. >
  76. Notion.so
  77. </Link>
  78. , the all-in-one-workspace
  79. <br />
  80. for your notes, tasks, wikis, and databases.
  81. </Text>
  82. </Container>
  83. </Body>
  84. </Html>
  85. );
  86.  
  87. export default PrimaryActionEmail;
  88.  
  89. const main = {
  90. backgroundColor: "#ffffff",
  91. };
  92.  
  93. const container = {
  94. paddingLeft: "12px",
  95. paddingRight: "12px",
  96. margin: "0 auto",
  97. };
  98.  
  99. const h1 = {
  100. color: "#333",
  101. fontFamily:
  102. "-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif",
  103. fontSize: "24px",
  104. fontWeight: "bold",
  105. margin: "40px 0",
  106. padding: "0",
  107. };
  108.  
  109. const link = {
  110. color: "#2754C5",
  111. fontFamily:
  112. "-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif",
  113. fontSize: "14px",
  114. textDecoration: "underline",
  115. };
  116.  
  117. const text = {
  118. color: "#333",
  119. fontFamily:
  120. "-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif",
  121. fontSize: "14px",
  122. margin: "24px 0",
  123. };
  124.  
  125. const footer = {
  126. color: "#898989",
  127. fontFamily:
  128. "-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif",
  129. fontSize: "12px",
  130. lineHeight: "22px",
  131. marginTop: "12px",
  132. marginBottom: "24px",
  133. };
  134.  
  135. const code = {
  136. display: "inline-block",
  137. padding: "16px 4.5%",
  138. width: "90.5%",
  139. backgroundColor: "#f4f4f4",
  140. borderRadius: "5px",
  141. border: "1px solid #eee",
  142. color: "#333",
  143. };
  144.  
Advertisement
Add Comment
Please, Sign In to add comment