Skip to content

Commit

Permalink
fix: emails colors
Browse files Browse the repository at this point in the history
  • Loading branch information
rharkor committed May 27, 2024
1 parent 94f3c17 commit 993efbc
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 17 deletions.
2 changes: 1 addition & 1 deletion apps/app/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ SMTP_PASSWORD=secret
SMTP_FROM_NAME=FromName
SMTP_FROM_EMAIL=[email protected]
NEXT_PUBLIC_ENABLE_MAILING_SERVICE=false
SUPPORT_EMAIL=support@example.com
SUPPORT_EMAIL=louis@huort.com
S3_REGION=fr-par
NEXT_PUBLIC_S3_BUCKET_NAME=secret
S3_ACCESS_KEY_ID=secret
Expand Down
3 changes: 2 additions & 1 deletion apps/app/src/constants/medias.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export const logoUrl = "https://upload.wikimedia.org/wikipedia/commons/5/5e/Vercel_logo_black.svg"
export const logoUrl =
"https://imgs.search.brave.com/I_nW-x21BB6_TTk_xXuYVy5pZlaMfv0h4q35oqhrxvc/rs:fit:860:0:0/g:ce/aHR0cHM6Ly9zZWVr/bG9nby5jb20vaW1h/Z2VzL04vbmV4dC1q/cy1pY29uLWxvZ28t/RUUzMDJENURCRC1z/ZWVrbG9nby5jb20u/cG5n"
2 changes: 1 addition & 1 deletion packages/emails/components/body.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { ReactNode } from "react"

import { Body as OBody, BodyProps } from "@react-email/components"

import { background, foreground } from "../contants"
import { background, foreground } from "../constants"

export const Body = ({
children,
Expand Down
2 changes: 1 addition & 1 deletion packages/emails/components/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { ReactNode } from "react"

import { Button as OButton, ButtonProps } from "@react-email/components"

import { foreground, primary } from "../contants"
import { foreground, primary } from "../constants"

export const Button = ({
children,
Expand Down
2 changes: 1 addition & 1 deletion packages/emails/components/card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { ReactNode } from "react"

import { Section as OSection, SectionProps } from "@react-email/components"

import { content1 } from "../contants"
import { content1 } from "../constants"

export const Card = ({
children,
Expand Down
4 changes: 2 additions & 2 deletions packages/emails/components/footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react"

import { Container, Hr, Img, Text } from "@react-email/components"

import { mutedForeground } from "../contants"
import { mutedForeground } from "../constants"

import { Link } from "./link"

Expand Down Expand Up @@ -32,7 +32,7 @@ export const Footer = ({
</Link>
</Text>
<Hr style={hrStyle} />
<Img src={logoUrl} width="82" height="32" alt="Next boilerplate" style={imgStyle} />
<Img src={logoUrl} width="32" height="32" alt="Next boilerplate" style={imgStyle} />
<Text style={subFooterTextStyle}>© {curYear} Next boilerplate - All rights reserved</Text>
</Container>
)
Expand Down
4 changes: 3 additions & 1 deletion packages/emails/components/header.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import React from "react"

import { Img, Text } from "@react-email/components"

export const Header = ({ logoUrl, titleText }: { logoUrl: string; titleText: string }) => {
return (
<>
<Img src={logoUrl} width="82" height="32" alt="Next boilerplate" />
<Img src={logoUrl} width="32" height="32" alt="Next boilerplate" />
<Text style={title}>{titleText}</Text>
</>
)
Expand Down
2 changes: 1 addition & 1 deletion packages/emails/components/link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { ReactNode } from "react"

import { Link as OLink, LinkProps } from "@react-email/components"

import { primary } from "../contants"
import { primary } from "../constants"

export const Link = ({
children,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const primary = "#006FEE"
export const background = "#FFFFFF"
export const background = "#f4f4f5"
export const content1 = "#FFFFFF"
export const content2 = "#f4f4f5"
export const content3 = "#e4e4e7"
Expand Down
7 changes: 4 additions & 3 deletions packages/emails/emails/change-email-otp.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { Header } from "components/header"
import * as React from "react"

import { CodeInline, Container as OContainer, Head, Html, Preview, Text } from "@react-email/components"
Expand All @@ -7,7 +6,8 @@ import { Body } from "../components/body"
import { Card } from "../components/card"
import { Container } from "../components/container"
import { Footer } from "../components/footer"
import { muted } from "../contants"
import { Header } from "../components/header"
import { muted } from "../constants"

interface ChangeEmailProps {
previewText: string
Expand Down Expand Up @@ -54,7 +54,8 @@ export const ChangeEmail = ({
)

export const previewProps: ChangeEmailProps = {
logoUrl: "https://upload.wikimedia.org/wikipedia/commons/5/5e/Vercel_logo_black.svg",
logoUrl:
"https://imgs.search.brave.com/I_nW-x21BB6_TTk_xXuYVy5pZlaMfv0h4q35oqhrxvc/rs:fit:860:0:0/g:ce/aHR0cHM6Ly9zZWVr/bG9nby5jb20vaW1h/Z2VzL04vbmV4dC1q/cy1pY29uLWxvZ28t/RUUzMDJENURCRC1z/ZWVrbG9nby5jb20u/cG5n",
name: "John Doe",
previewText: "Confirm your new email",
supportEmail: "[email protected]",
Expand Down
5 changes: 3 additions & 2 deletions packages/emails/emails/reset-password.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { Header } from "components/header"
import * as React from "react"

import { Head, Html, Preview, Text } from "@react-email/components"
Expand All @@ -8,6 +7,7 @@ import { Button } from "../components/button"
import { Card } from "../components/card"
import { Container } from "../components/container"
import { Footer } from "../components/footer"
import { Header } from "../components/header"

interface ResetPasswordProps {
resetLink: string
Expand Down Expand Up @@ -54,7 +54,8 @@ export const ResetPassword = ({
)

export const previewProps: ResetPasswordProps = {
logoUrl: "https://upload.wikimedia.org/wikipedia/commons/5/5e/Vercel_logo_black.svg",
logoUrl:
"https://imgs.search.brave.com/I_nW-x21BB6_TTk_xXuYVy5pZlaMfv0h4q35oqhrxvc/rs:fit:860:0:0/g:ce/aHR0cHM6Ly9zZWVr/bG9nby5jb20vaW1h/Z2VzL04vbmV4dC1q/cy1pY29uLWxvZ28t/RUUzMDJENURCRC1z/ZWVrbG9nby5jb20u/cG5n",
name: "John Doe",
previewText: "Reset password request.",
supportEmail: "[email protected]",
Expand Down
5 changes: 3 additions & 2 deletions packages/emails/emails/verify-email.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { Header } from "components/header"
import * as React from "react"

import { Head, Html, Preview, Text } from "@react-email/components"
Expand All @@ -8,6 +7,7 @@ import { Button } from "../components/button"
import { Card } from "../components/card"
import { Container } from "../components/container"
import { Footer } from "../components/footer"
import { Header } from "../components/header"

interface VerifyEmailProps {
verificationLink: string
Expand Down Expand Up @@ -54,7 +54,8 @@ export const VerifyEmail = ({
)

export const previewProps: VerifyEmailProps = {
logoUrl: "https://upload.wikimedia.org/wikipedia/commons/5/5e/Vercel_logo_black.svg",
logoUrl:
"https://imgs.search.brave.com/I_nW-x21BB6_TTk_xXuYVy5pZlaMfv0h4q35oqhrxvc/rs:fit:860:0:0/g:ce/aHR0cHM6Ly9zZWVr/bG9nby5jb20vaW1h/Z2VzL04vbmV4dC1q/cy1pY29uLWxvZ28t/RUUzMDJENURCRC1z/ZWVrbG9nby5jb20u/cG5n",
name: "John Doe",
previewText: "Verify your email address to complete your registration.",
supportEmail: "[email protected]",
Expand Down

0 comments on commit 993efbc

Please sign in to comment.