refactor: removed unnecessary tile size variable
This commit is contained in:
@@ -27,7 +27,7 @@ export default function NewsletterTemplate(
|
||||
subject: `What's new from Hackernews?`,
|
||||
template: (
|
||||
<Html>
|
||||
<Section style={main}>
|
||||
<Section className='bg-white'>
|
||||
<div className='mx-auto w-full max-w-2xl overflow-hidden rounded-lg bg-white shadow-lg'>
|
||||
<div className='text-center '>
|
||||
<h1 className='my-4 text-3xl font-bold'>Good day!</h1>
|
||||
@@ -36,7 +36,13 @@ export default function NewsletterTemplate(
|
||||
{sayings[Math.floor(Math.random() * sayings.length)]}:
|
||||
</p>
|
||||
</div>
|
||||
<Container style={container}>
|
||||
<Container
|
||||
style={{
|
||||
margin: '0 auto',
|
||||
padding: '20px 0 48px',
|
||||
width: '580px'
|
||||
}}
|
||||
>
|
||||
<Text>
|
||||
{stories.map(story => {
|
||||
return (
|
||||
@@ -88,13 +94,3 @@ export default function NewsletterTemplate(
|
||||
)
|
||||
};
|
||||
}
|
||||
|
||||
const main = {
|
||||
backgroundColor: '#ffffff'
|
||||
};
|
||||
|
||||
const container = {
|
||||
margin: '0 auto',
|
||||
padding: '20px 0 48px',
|
||||
width: '580px'
|
||||
};
|
||||
|
||||
@@ -12,31 +12,26 @@ type EmailProps = {
|
||||
export default function Email({ title, body }: EmailProps) {
|
||||
return (
|
||||
<Html>
|
||||
<Section
|
||||
className='mx-auto w-full max-w-2xl overflow-hidden rounded-lg bg-white shadow-lg'
|
||||
style={main}
|
||||
>
|
||||
<Container style={container}>
|
||||
<Section className='mx-auto w-full max-w-2xl overflow-hidden rounded-lg bg-white shadow-lg'>
|
||||
<Container
|
||||
style={{
|
||||
margin: '0 auto',
|
||||
padding: '20px 0 48px',
|
||||
width: '580px'
|
||||
}}
|
||||
>
|
||||
<h1 className='mt-4 text-center text-3xl font-bold'>{title}</h1>
|
||||
<Text style={paragraph}>{body}</Text>
|
||||
<Text
|
||||
style={{
|
||||
fontSize: '16px',
|
||||
marginBottom: '16px'
|
||||
}}
|
||||
>
|
||||
{body}
|
||||
</Text>
|
||||
</Container>
|
||||
<Footer />
|
||||
</Section>
|
||||
</Html>
|
||||
);
|
||||
}
|
||||
|
||||
const main = {
|
||||
backgroundColor: '#ffffff'
|
||||
};
|
||||
|
||||
const container = {
|
||||
margin: '0 auto',
|
||||
padding: '20px 0 48px',
|
||||
width: '580px'
|
||||
};
|
||||
|
||||
const paragraph = {
|
||||
fontSize: '16px',
|
||||
marginBottom: '16px'
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user