Skip to content
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
299 changes: 117 additions & 182 deletions apps/demo/emails/magic-links/slack-confirm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ import {
Preview,
Row,
Section,
Tailwind,
Text,
} from '@react-email/components';
import tailwindConfig from '../tailwind.config';

interface SlackConfirmEmailProps {
validationCode?: string;
Expand All @@ -26,121 +28,127 @@ export const SlackConfirmEmail = ({
}: SlackConfirmEmailProps) => (
<Html>
<Head />
<Body style={main}>
<Preview>Confirm your email address</Preview>
<Container style={container}>
<Section style={logoContainer}>
<Img
src={`${baseUrl}/static/slack-logo.png`}
width="120"
height="36"
alt="Slack"
/>
</Section>
<Heading style={h1}>Confirm your email address</Heading>
<Text style={heroText}>
Your confirmation code is below - enter it in your open browser window
and we'll help you get signed in.
</Text>
<Tailwind config={tailwindConfig}>
<Body className="bg-white font-slack mx-auto my-0">
<Preview>Confirm your email address</Preview>
<Container className="mx-auto my-0 py-0 px-5">
<Section className="mt-8">
<Img
src={`${baseUrl}/static/slack-logo.png`}
width="120"
height="36"
alt="Slack"
/>
</Section>
<Heading className="text-[#1d1c1d] text-4xl font-bold my-7.5 mx-0 p-0 leading-10.5">
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Oct 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Tailwind preset backing this email doesn’t define my-7.5 or leading-10.5, so this heading renders without the intended spacing/line-height. Replace them with arbitrary values (e.g., my-[30px], leading-[42px]) so the styles survive compilation.

Prompt for AI agents
Address the following comment on apps/demo/emails/magic-links/slack-confirm.tsx at line 43:

<comment>The Tailwind preset backing this email doesn’t define my-7.5 or leading-10.5, so this heading renders without the intended spacing/line-height. Replace them with arbitrary values (e.g., my-[30px], leading-[42px]) so the styles survive compilation.</comment>

<file context>
@@ -26,121 +28,127 @@ export const SlackConfirmEmail = ({
+              alt=&quot;Slack&quot;
+            /&gt;
+          &lt;/Section&gt;
+          &lt;Heading className=&quot;text-[#1d1c1d] text-4xl font-bold my-7.5 mx-0 p-0 leading-10.5&quot;&gt;
+            Confirm your email address
+          &lt;/Heading&gt;
</file context>
Suggested change
<Heading className="text-[#1d1c1d] text-4xl font-bold my-7.5 mx-0 p-0 leading-10.5">
<Heading className="text-[#1d1c1d] text-4xl font-bold my-[30px] mx-0 p-0 leading-[42px]">
Fix with Cubic

Confirm your email address
</Heading>
<Text className="text-xl mb-7.5">
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Oct 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mb-7.5 isn’t part of the Tailwind spacing scale from pixelBasedPreset, so this paragraph loses its bottom margin. Use an arbitrary value class like mb-[30px] instead.

Prompt for AI agents
Address the following comment on apps/demo/emails/magic-links/slack-confirm.tsx at line 46:

<comment>mb-7.5 isn’t part of the Tailwind spacing scale from pixelBasedPreset, so this paragraph loses its bottom margin. Use an arbitrary value class like mb-[30px] instead.</comment>

<file context>
@@ -26,121 +28,127 @@ export const SlackConfirmEmail = ({
+          &lt;Heading className=&quot;text-[#1d1c1d] text-4xl font-bold my-7.5 mx-0 p-0 leading-10.5&quot;&gt;
+            Confirm your email address
+          &lt;/Heading&gt;
+          &lt;Text className=&quot;text-xl mb-7.5&quot;&gt;
+            Your confirmation code is below - enter it in your open browser
+            window and we&#39;ll help you get signed in.
</file context>
Suggested change
<Text className="text-xl mb-7.5">
<Text className="text-xl mb-[30px]">

✅ Addressed in ab9affb

Your confirmation code is below - enter it in your open browser
window and we'll help you get signed in.
</Text>

<Section style={codeBox}>
<Text style={confirmationCodeText}>{validationCode}</Text>
</Section>
<Section className="bg-[rgb(245,244,245)] rounded mb-[30px] py-10 px-[10px]">
<Text className="text-3xl leading-[24px] text-center align-middle">
{validationCode}
</Text>
</Section>

<Text style={text}>
If you didn't request this email, there's nothing to worry about, you
can safely ignore it.
</Text>
<Text className="text-black text-sm leading-6">
If you didn't request this email, there's nothing to worry about,
you can safely ignore it.
</Text>

<Section>
<Row style={footerLogos}>
<Column style={{ width: '66%' }}>
<Img
src={`${baseUrl}/static/slack-logo.png`}
width="120"
height="36"
alt="Slack"
/>
</Column>
<Column align="right">
<Link href="/">
<Img
src={`${baseUrl}/static/slack-twitter.png`}
width="32"
height="32"
alt="Slack"
style={socialMediaIcon}
/>
</Link>
<Link href="/">
<Section>
<Row className="mb-8 pl-2 pr-2">
<Column className="w-2/3">
<Img
src={`${baseUrl}/static/slack-facebook.png`}
width="32"
height="32"
src={`${baseUrl}/static/slack-logo.png`}
width="120"
height="36"
alt="Slack"
style={socialMediaIcon}
/>
</Link>
<Link href="/">
<Img
src={`${baseUrl}/static/slack-linkedin.png`}
width="32"
height="32"
alt="Slack"
style={socialMediaIcon}
/>
</Link>
</Column>
</Row>
</Section>

<Section>
<Link
style={footerLink}
href="https://slackhq.com"
target="_blank"
rel="noopener noreferrer"
>
Our blog
</Link>
&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
<Link
style={footerLink}
href="https://slack.com/legal"
target="_blank"
rel="noopener noreferrer"
>
Policies
</Link>
&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
<Link
style={footerLink}
href="https://slack.com/help"
target="_blank"
rel="noopener noreferrer"
>
Help center
</Link>
&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
<Link
style={footerLink}
href="https://slack.com/community"
target="_blank"
rel="noopener noreferrer"
data-auth="NotApplicable"
data-linkindex="6"
>
Slack Community
</Link>
<Text style={footerText}>
©2022 Slack Technologies, LLC, a Salesforce company. <br />
500 Howard Street, San Francisco, CA 94105, USA <br />
<br />
All rights reserved.
</Text>
</Section>
</Container>
</Body>
</Column>
<Column align="right">
<Link href="/">
<Img
src={`${baseUrl}/static/slack-twitter.png`}
width="32"
height="32"
alt="Slack"
className="inline ml-2"
/>
</Link>
<Link href="/">
<Img
src={`${baseUrl}/static/slack-facebook.png`}
width="32"
height="32"
alt="Slack"
className="inline ml-2"
/>
</Link>
<Link href="/">
<Img
src={`${baseUrl}/static/slack-linkedin.png`}
width="32"
height="32"
alt="Slack"
className="inline ml-2"
/>
</Link>
</Column>
</Row>
</Section>

<Section>
<Link
className="text-[#b7b7b7] underline"
href="https://slackhq.com"
target="_blank"
rel="noopener noreferrer"
>
Our blog
</Link>
&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
<Link
className="text-[#b7b7b7] underline"
href="https://slack.com/legal"
target="_blank"
rel="noopener noreferrer"
>
Policies
</Link>
&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
<Link
className="text-[#b7b7b7] underline"
href="https://slack.com/help"
target="_blank"
rel="noopener noreferrer"
>
Help center
</Link>
&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
<Link
className="text-[#b7b7b7] underline"
href="https://slack.com/community"
target="_blank"
rel="noopener noreferrer"
data-auth="NotApplicable"
data-linkindex="6"
>
Slack Community
</Link>
<Text className="text-xs leading-[15px] text-left mb-[50px] text-[#b7b7b7]">
©2022 Slack Technologies, LLC, a Salesforce company. <br />
500 Howard Street, San Francisco, CA 94105, USA <br />
<br />
All rights reserved.
</Text>
</Section>
</Container>
</Body>
</Tailwind>
</Html>
);

Expand All @@ -150,76 +158,3 @@ SlackConfirmEmail.PreviewProps = {

export default SlackConfirmEmail;

const footerText = {
fontSize: '12px',
color: '#b7b7b7',
lineHeight: '15px',
textAlign: 'left' as const,
marginBottom: '50px',
};

const footerLink = {
color: '#b7b7b7',
textDecoration: 'underline',
};

const footerLogos = {
marginBottom: '32px',
paddingLeft: '8px',
paddingRight: '8px',
};

const socialMediaIcon = {
display: 'inline',
marginLeft: '8px',
};

const main = {
backgroundColor: '#ffffff',
margin: '0 auto',
fontFamily:
"-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif",
};

const container = {
margin: '0 auto',
padding: '0px 20px',
};

const logoContainer = {
marginTop: '32px',
};

const h1 = {
color: '#1d1c1d',
fontSize: '36px',
fontWeight: '700',
margin: '30px 0',
padding: '0',
lineHeight: '42px',
};

const heroText = {
fontSize: '20px',
lineHeight: '28px',
marginBottom: '30px',
};

const codeBox = {
background: 'rgb(245, 244, 245)',
borderRadius: '4px',
marginBottom: '30px',
padding: '40px 10px',
};

const confirmationCodeText = {
fontSize: '30px',
textAlign: 'center' as const,
verticalAlign: 'middle',
};

const text = {
color: '#000',
fontSize: '14px',
lineHeight: '24px',
};
11 changes: 11 additions & 0 deletions apps/demo/emails/tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { pixelBasedPreset, type TailwindConfig } from '@react-email/components';

export default {
presets: [pixelBasedPreset],
theme: {
fontFamily: {
slack:
"-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif",
},
},
} satisfies TailwindConfig;
10 changes: 5 additions & 5 deletions apps/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
"export": "email-dev export"
},
"dependencies": {
"@react-email/components": "workspace:*",
"@react-email/components": "npm:@react-email/[email protected]",
"email-dev": "workspace:*",
"react": "^19",
"react-dom": "^19",
"email-dev": "workspace:*"
"react-dom": "^19"
},
"devDependencies": {
"@react-email/preview-server": "workspace:*",
"next": "^15.3.2",
"@types/react": "^19",
"@types/react-dom": "^19"
"@types/react-dom": "^19",
"next": "^15.3.2"
}
}
Loading
Loading