mirror of
https://github.com/stack-auth/stack.git
synced 2026-07-20 21:29:36 +08:00
Add emails theme snippet in emails overview, linking to full templates and themes page
This commit is contained in:
parent
0467c3d752
commit
f5656e6934
@ -52,7 +52,23 @@ Hexclave also ships ready-made templates for the common flows - email verificati
|
||||
|
||||
## Can I match my brand?
|
||||
|
||||
Yes. Themes wrap every email in a consistent layout - header, footer, logo, background. Use the built-in Light, Dark, and Colorful themes, or write your own as a TSX component. Set a project default, override per-email with `themeId`, or send with no theme at all.
|
||||
Yes. Themes wrap every email in a consistent layout - header, footer, logo, background. Use the built-in Light, Dark, and Colorful themes, or write your own as a TSX component:
|
||||
|
||||
```tsx
|
||||
import { ThemeProps, ProjectLogo } from "@hexclave/emails";
|
||||
|
||||
export function EmailTheme({ children, unsubscribeLink, projectLogos }: ThemeProps) {
|
||||
return (
|
||||
<>
|
||||
<ProjectLogo data={projectLogos} mode="light" />
|
||||
{children}
|
||||
{unsubscribeLink && <a href={unsubscribeLink}>Unsubscribe</a>}
|
||||
</>
|
||||
);
|
||||
}
|
||||
```
|
||||
|
||||
Set a project default, override per-email with `themeId`, or send with no theme at all. See [Templates & themes](./templates-and-themes) for the full theme API and built-in themes.
|
||||
|
||||
## Can I respect unsubscribes and preferences?
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user