Files
HiveGrid-Wireframes/03 Quellen und Referenzen/hivegrid-cloud/packages/mail/scripts/previews.ts
T

88 lines
2.7 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: "HiveGrid",
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.mollie.com/i/abc",
},
"system-message": {
brand,
subject: "Your appointment is confirmed",
previewText: "All details for your appointment at a glance",
eyebrow: "Appointment",
title: "We look forward to seeing you",
intro: "Your appointment has been confirmed. You can find the most important details below.",
actionUrl: "https://app.example.com/bookings/42",
actionLabel: "View appointment",
details: [
{ label: "Date", value: "17 June 2026, 10:00" },
{ label: "Location", value: "Acme Inc, Main Street 1" },
],
},
"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",
},
};