EN

@core / email

1.0.0 ▾
verifiedMIT
GitHub

Transactional email with typed React Email templates: Resend, SMTP or console in dev

Code9 filesContext~544 tokensscan passed

The exact tree that will be injected, after .genpmignore. Pinned to

src/lib/email/templates/magic-link.tsread-only · 3e2976e
import { Button, Heading, Text } from '@react-email/components';
import { createElement as h } from 'react';
import { button, Layout, muted, text } from './layout.js';

export type MagicLinkProps = { url: string; expiresInMinutes: number };

export const magicLink = {
  subject: () => 'Your sign-in link',
  render: (p: MagicLinkProps) =>
    h(
      Layout,
      { preview: 'Sign in with one click' },
      h(Heading, { as: 'h1' }, 'Sign in'),
      h(Text, { style: text }, 'Click the button to sign in. The link works once.'),
      h(Button, { href: p.url, style: button }, 'Sign in'),
      h(Text, { style: muted }, `Expires in ${p.expiresInMinutes} minutes. If you did not ask for it, ignore this email.`),
    ),
};

Report @core/email

Sign in with GitHub to report a package.