mirror of
https://github.com/resend/react-email.git
synced 2026-09-14 14:18:02 +08:00
d0a7a52254
Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: João Melo <jopcmelo@gmail.com>
33 lines
728 B
TypeScript
33 lines
728 B
TypeScript
import { CodeBlock, Font } from 'react-email';
|
|
import { Layout } from '../_components/layout';
|
|
|
|
export const component = (
|
|
<>
|
|
<Font
|
|
fallbackFontFamily="monospace"
|
|
fontFamily="CommitMono"
|
|
fontStyle="normal"
|
|
fontWeight={400}
|
|
webFont={{
|
|
url: '/fonts/commit-mono/commit-mono-regular.ttf',
|
|
format: 'truetype',
|
|
}}
|
|
/>
|
|
<CodeBlock
|
|
code={`await resend.emails.send({
|
|
from: 'you@example.com',
|
|
to: 'user@gmail.com',
|
|
subject: 'hello world',
|
|
react: EmailTemplate({ firstName: 'John' }),
|
|
});`}
|
|
fontFamily="'CommitMono', monospace"
|
|
language="javascript"
|
|
theme={{}}
|
|
/>
|
|
</>
|
|
);
|
|
|
|
export default () => {
|
|
return <Layout>{component}</Layout>;
|
|
};
|