Skip to content
Merged
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
205 changes: 78 additions & 127 deletions apps/demo/emails/reset-password/twitch-reset-password.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ import {
Preview,
Row,
Section,
Tailwind,
Text,
} from '@react-email/components';
import tailwindConfig from '../tailwind.config';

interface TwitchResetPasswordEmailProps {
username?: string;
Expand All @@ -33,83 +35,85 @@ export const TwitchResetPasswordEmail = ({
return (
<Html>
<Head />
<Body style={main}>
<Preview>You updated the password for your Twitch account</Preview>
<Container style={container}>
<Section style={logo}>
<Img
width={114}
src={`${baseUrl}/static/twitch-logo.png`}
alt="Twitch"
style={logoImg}
/>
</Section>
<Section style={sectionsBorders}>
<Tailwind config={tailwindConfig}>
<Body className="bg-[#efeef1] font-twitch">
<Preview>You updated the password for your Twitch account</Preview>
<Container className="max-w-[580px] my-[30px] mx-auto bg-white">
<Section className="p-[30px]">
<Img
width={114}
src={`${baseUrl}/static/twitch-logo.png`}
alt="Twitch"
className="mx-auto"
/>
</Section>
<Section className="w-full">
<Row>
<Column className="[border-bottom:1px_solid_rgb(238,238,238)] w-[249px]" />
<Column className="[border-bottom:1px_solid_rgb(145,71,255)] w-[102px]" />
<Column className="[border-bottom:1px_solid_rgb(238,238,238)] w-[249px]" />
</Row>
</Section>
<Section className="pt-[5px] px-5 pb-[10px]">
<Text className="text-[14px] leading-[1.5]">Hi {username},</Text>
<Text className="text-[14px] leading-[1.5]">
You updated the password for your Twitch account on{' '}
{formattedDate}. If this was you, then no further action is
required.
</Text>
<Text className="text-[14px] leading-[1.5]">
However if you did NOT perform this password change, please{' '}
<Link href="https://www.twitch.tv" className="underline">
reset your account password
</Link>{' '}
immediately.
</Text>
<Text className="text-[14px] leading-[1.5]">
Remember to use a password that is both strong and unique to
your Twitch account. To learn more about how to create a strong
and unique password,{' '}
<Link href="https://www.twitch.tv" className="underline">
click here.
</Link>
</Text>
<Text className="text-[14px] leading-[1.5]">
Still have questions? Please contact{' '}
<Link href="https://www.twitch.tv" className="underline">
Twitch Support
</Link>
</Text>
<Text className="text-[14px] leading-[1.5]">
Thanks,
<br />
Twitch Support Team
</Text>
</Section>
</Container>

<Section className="max-w-[580px] mx-auto">
<Row>
<Column style={sectionBorder} />
<Column style={sectionCenter} />
<Column style={sectionBorder} />
<Column align="right" className="w-1/2 pr-2">
<Img
src={`${baseUrl}/static/twitch-icon-twitter.png`}
alt="Twitter"
/>
</Column>
<Column align="left" className="w-1/2 pl-2">
<Img
src={`${baseUrl}/static/twitch-icon-facebook.png`}
alt="Facebook"
/>
</Column>
</Row>
<Row>
<Text className="text-center text-[#706a7b]">
© 2022 Twitch, All Rights Reserved <br />
350 Bush Street, 2nd Floor, San Francisco, CA, 94104 - USA
</Text>
</Row>
</Section>
<Section style={content}>
<Text style={paragraph}>Hi {username},</Text>
<Text style={paragraph}>
You updated the password for your Twitch account on{' '}
{formattedDate}. If this was you, then no further action is
required.
</Text>
<Text style={paragraph}>
However if you did NOT perform this password change, please{' '}
<Link href="https://www.twitch.tv" style={link}>
reset your account password
</Link>{' '}
immediately.
</Text>
<Text style={paragraph}>
Remember to use a password that is both strong and unique to your
Twitch account. To learn more about how to create a strong and
unique password,{' '}
<Link href="https://www.twitch.tv" style={link}>
click here.
</Link>
</Text>
<Text style={paragraph}>
Still have questions? Please contact{' '}
<Link href="https://www.twitch.tv" style={link}>
Twitch Support
</Link>
</Text>
<Text style={paragraph}>
Thanks,
<br />
Twitch Support Team
</Text>
</Section>
</Container>

<Section style={footer}>
<Row>
<Column align="right" style={{ width: '50%', paddingRight: '8px' }}>
<Img
src={`${baseUrl}/static/twitch-icon-twitter.png`}
alt="Twitter"
/>
</Column>
<Column align="left" style={{ width: '50%', paddingLeft: '8px' }}>
<Img
src={`${baseUrl}/static/twitch-icon-facebook.png`}
alt="Facebook"
/>
</Column>
</Row>
<Row>
<Text style={{ textAlign: 'center', color: '#706a7b' }}>
© 2022 Twitch, All Rights Reserved <br />
350 Bush Street, 2nd Floor, San Francisco, CA, 94104 - USA
</Text>
</Row>
</Section>
</Body>
</Body>
</Tailwind>
</Html>
);
};
Expand All @@ -120,56 +124,3 @@ TwitchResetPasswordEmail.PreviewProps = {
} as TwitchResetPasswordEmailProps;

export default TwitchResetPasswordEmail;

const fontFamily = 'HelveticaNeue,Helvetica,Arial,sans-serif';

const main = {
backgroundColor: '#efeef1',
fontFamily,
};

const paragraph = {
lineHeight: 1.5,
fontSize: 14,
};

const container = {
maxWidth: '580px',
margin: '30px auto',
backgroundColor: '#ffffff',
};

const footer = {
maxWidth: '580px',
margin: '0 auto',
};

const content = {
padding: '5px 20px 10px 20px',
};

const logo = {
padding: 30,
};

const logoImg = {
margin: '0 auto',
};

const sectionsBorders = {
width: '100%',
};

const sectionBorder = {
borderBottom: '1px solid rgb(238,238,238)',
width: '249px',
};

const sectionCenter = {
borderBottom: '1px solid rgb(145,71,255)',
width: '102px',
};

const link = {
textDecoration: 'underline',
};
1 change: 1 addition & 0 deletions apps/demo/emails/tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export default {
theme: {
fontFamily: {
amazon: ['Ember', 'Helvetica', 'Arial', 'sans-serif'],
twitch: ['HelveticaNeue', 'Helvetica', 'Arial', 'sans-serif'],
'stack-overflow': ['Helvetica Neue', 'Helvetica', 'Arial', 'sans-serif'],
'stack-overflow-mono': 'Consolas,monospace',
github:
Expand Down
Loading