ZH
测试版翻译

@core / email

1.0.0 ▾
已验证MIT
GitHub

带类型化 React Email 模板的事务邮件:Resend、SMTP 或开发时输出到控制台

代码9 个文件上下文约 544 个 token扫描通过

应用 .genpmignore 后将被注入的确切目录树。固定于

src/lib/email/templates/magic-link.ts只读 · 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.`),
    ),
};

举报 @core/email

使用 GitHub 登录后才能举报包。