Files
HiveGrid-Wireframes/hivegrid-cloud/packages/mail/scripts/previews.ts
T

74 lines
2.1 KiB
TypeScript

/**
* Sample props per template, served by the local preview-server.
* Keep these realistic but synthetic — never seed with production
* PII. Used only in dev, never bundled into the published package.
*/
import { withBrandDefaults } from "../src/templates-react/_layout/theme.js";
import type { ReactTemplatePropsMap } from "../src/templates-react/render.js";
const brand = withBrandDefaults({
productName: "ToolCTRL",
tenantName: "Acme Inc",
primaryColor: "#2563eb",
});
export const samplePropsByTemplate: { [K in keyof ReactTemplatePropsMap]: ReactTemplatePropsMap[K] } = {
welcome: {
brand,
recipientName: "Ada Lovelace",
actionUrl: "https://app.example.com/login",
},
"magic-link": {
brand,
recipientName: "Ada Lovelace",
actionUrl: "https://app.example.com/magic/abc123",
expiresInMinutes: 15,
},
"password-reset": {
brand,
recipientName: "Ada Lovelace",
actionUrl: "https://app.example.com/reset?t=xyz789",
},
invitation: {
brand,
recipientName: "Ada Lovelace",
senderName: "Grace Hopper",
senderOrganization: "Acme Inc",
actionUrl: "https://app.example.com/invite/abc",
},
"subscription-success": {
brand,
recipientName: "Ada Lovelace",
planName: "Pro",
amountFormatted: "$29.00",
nextBillingDate: "2026-06-17",
actionUrl: "https://app.example.com/billing",
},
"subscription-failed": {
brand,
recipientName: "Ada Lovelace",
planName: "Pro",
amountFormatted: "$29.00",
failureReason: "Card declined",
retryAt: "2026-05-20",
actionUrl: "https://app.example.com/billing",
},
"invoice-sent": {
brand,
recipientName: "Ada Lovelace",
invoiceNumber: "INV-2026-0001",
amountFormatted: "€99.00",
issueDate: "2026-05-17",
dueDate: "2026-06-17",
actionUrl: "https://invoice.stripe.com/i/abc",
},
"tenant-notification": {
brand,
recipientName: "Ada Lovelace",
title: "New comment on Ticket #42",
body: "Grace mentioned you in a comment on Ticket #42. Tap below to read the thread.",
actionUrl: "https://app.example.com/tickets/42",
actionLabel: "View ticket",
},
};