Update CSS in email templates
Enhanced the design of the 'invite-user' and 'confirm-email' templates by adding new CSS code. This CSS code professionaly styles the email, improving readability and user experience.
This commit is contained in:
16
packages/email-templates/src/components/body-style.tsx
Normal file
16
packages/email-templates/src/components/body-style.tsx
Normal file
@@ -0,0 +1,16 @@
|
||||
import * as React from 'react';
|
||||
|
||||
export function BodyStyle() {
|
||||
return (
|
||||
<style>
|
||||
{`
|
||||
body {
|
||||
background-color: #fff;
|
||||
margin: auto;
|
||||
font-family: sans-serif;
|
||||
color: #484848;
|
||||
}
|
||||
`}
|
||||
</style>
|
||||
);
|
||||
}
|
||||
17
packages/email-templates/src/components/cta-button.tsx
Normal file
17
packages/email-templates/src/components/cta-button.tsx
Normal file
@@ -0,0 +1,17 @@
|
||||
import { Button } from '@react-email/components';
|
||||
import * as React from 'react';
|
||||
|
||||
export function CtaButton(
|
||||
props: React.PropsWithChildren<{
|
||||
href: string;
|
||||
}>,
|
||||
) {
|
||||
return (
|
||||
<Button
|
||||
className="w-full bg-[#000000] rounded text-white text-[14px] font-semibold no-underline text-center py-3"
|
||||
href={props.href}
|
||||
>
|
||||
{props.children}
|
||||
</Button>
|
||||
);
|
||||
}
|
||||
12
packages/email-templates/src/components/footer.tsx
Normal file
12
packages/email-templates/src/components/footer.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import { Container, Text } from '@react-email/components';
|
||||
import * as React from 'react';
|
||||
|
||||
export function EmailFooter(props: React.PropsWithChildren) {
|
||||
return (
|
||||
<Container>
|
||||
<Text className="text-[12px] leading-[24px] text-gray-300 px-4">
|
||||
{props.children}
|
||||
</Text>
|
||||
</Container>
|
||||
);
|
||||
}
|
||||
10
packages/email-templates/src/components/heading.tsx
Normal file
10
packages/email-templates/src/components/heading.tsx
Normal file
@@ -0,0 +1,10 @@
|
||||
import * as React from 'react';
|
||||
import { Heading } from '@react-email/components';
|
||||
|
||||
export function EmailHeading(props: React.PropsWithChildren) {
|
||||
return (
|
||||
<Heading className="text-black font-sans tracking-tight text-[20px] font-normal p-0 mx-0">
|
||||
{props.children}
|
||||
</Heading>
|
||||
);
|
||||
}
|
||||
30
packages/email-templates/src/components/wrapper.tsx
Normal file
30
packages/email-templates/src/components/wrapper.tsx
Normal file
@@ -0,0 +1,30 @@
|
||||
import { Container } from '@react-email/components';
|
||||
import * as React from 'react';
|
||||
|
||||
export function EmailWrapper(
|
||||
props: React.PropsWithChildren<{
|
||||
className?: string;
|
||||
}>,
|
||||
) {
|
||||
return (
|
||||
<Container
|
||||
style={{
|
||||
backgroundColor: '#fff',
|
||||
margin: 'auto',
|
||||
fontFamily: 'sans-serif',
|
||||
color: '#484848',
|
||||
}}
|
||||
>
|
||||
<Container
|
||||
style={{
|
||||
maxWidth: '535px',
|
||||
backgroundColor: '#fff',
|
||||
margin: 'auto',
|
||||
}}
|
||||
className={'my-[36px] mx-auto px-4 ' + props.className || ''}
|
||||
>
|
||||
{props.children}
|
||||
</Container>
|
||||
</Container>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user