feat(templates): add styles to Message

This commit is contained in:
Julien Oculi 2024-04-11 16:48:52 +02:00
parent f3918321bd
commit 8194fd3aa3

View file

@ -1,18 +1,19 @@
import { Body, Html, Markdown, Preview, Section, Text } from 'jsx-email' import { Body, Container, Html, Markdown, Preview } from 'jsx-email'
import { Signature } from './components/Signature.tsx' import { Signature } from './components/Signature.tsx'
import type { Template } from '../types.ts' import type { Template } from '../types.ts'
import { BaseStyle, bodyCss, messageCss, textCss } from './styles/base.tsx'
function Message( function Message(
{ summary, body }: { summary?: string; body: string }, { summary, body }: { summary?: string; body: string },
) { ) {
return ( return (
<Html lang='fr'> <Html lang='fr' style={{ fontSize: '14px' }}>
<BaseStyle />
<Preview>{summary}</Preview> <Preview>{summary}</Preview>
<Body> <Body style={bodyCss}>
<Markdown>{body}</Markdown> <Container style={messageCss}>
<Section> <Markdown style={textCss}>{body}</Markdown>
<Text>Coh@bit</Text> </Container>
</Section>
<Signature /> <Signature />
</Body> </Body>
</Html> </Html>