Apply brand defaults to MJML survey and product buttons
Quality / quality (ubuntu-latest) (push) Failing after 1s
Quality / quality (windows-latest) (push) Canceled after 0s

This commit is contained in:
Clintchiz committed 2026-09-05 17:56:46 +05:30
1 parent 07ed6b2596
commit b0fca36bca
5 files changed
+23 -3

No files matched your search

+1 -1
View File
@@ -36,7 +36,7 @@ const isEmailRootChild = (node: BlockNode, context: unknown) =>
(context as { rootBlockIds?: string[] } | undefined)?.rootBlockIds?.includes(node.id) ?? false;
const mjmlDocumentHead = (node: BlockNode, context: unknown) => {
const meta = context as { emailSubject?: string; emailPreheader?: string } | undefined;
return `<mj-head><mj-title>${html(meta?.emailSubject)}</mj-title>${meta?.emailPreheader ? `<mj-preview>${html(meta.emailPreheader)}</mj-preview>` : ""}<mj-attributes><mj-all font-family="${html(attrs(node).fontFamily ?? "Arial, sans-serif")}" /><mj-text color="${html(attrs(node).textColor ?? "#111827")}" /></mj-attributes></mj-head>`;
return `<mj-head><mj-title>${html(meta?.emailSubject)}</mj-title>${meta?.emailPreheader ? `<mj-preview>${html(meta.emailPreheader)}</mj-preview>` : ""}<mj-attributes><mj-all font-family="${html(attrs(node).fontFamily ?? "Arial, sans-serif")}" /><mj-text color="${html(attrs(node).textColor ?? "#111827")}" /><mj-button background-color="${html(attrs(node).linkColor ?? "#2563eb")}" /></mj-attributes></mj-head>`;
};
export const ampLayoutClass = (node: BlockNode) =>
"wrn-layout-" + Array.from(node.id, char => char.codePointAt(0)!.toString(16)).join("-");