mailer/templates/Message.tsx

46 lines
914 B
TypeScript

import { Body, Html, Markdown, Preview, Section, Text } from 'jsx-email'
import { Signature } from './_Signature.tsx'
import type { Template } from '../types.ts'
function Message(
{ summary, body }: { summary?: string; body: string },
) {
return (
<Html lang='fr'>
<Preview>{summary}</Preview>
<Body>
<Markdown>{body}</Markdown>
<Section>
<Text>Coh@bit</Text>
</Section>
<Signature />
</Body>
</Html>
)
}
const template: Template<typeof Message, Parameters<typeof Message>[0]> = {
props: [
{
name: 'Résumé',
description: 'Résumé du mail.',
required: false,
multiline: false,
tag: 'summary',
},
{
name: 'Message',
description: 'Contenu du mail (markdown).',
required: true,
multiline: true,
tag: 'body',
},
],
name: 'message',
description: 'Message mail en markdown.',
builder: Message,
}
export default template
//summary <90c