feat: add ssr email templates rendering

This commit is contained in:
Ahmed Bouhuolia
2024-11-19 17:14:13 +02:00
parent f7bf24acb3
commit c6db54175f
7 changed files with 138 additions and 41 deletions

View File

@@ -1,8 +1,8 @@
import {
Button,
Column,
Container,
Heading,
render,
Row,
Section,
Text,
@@ -148,6 +148,17 @@ export const ReceiptEmailTemplate: React.FC<
);
};
/**
* Renders the sale receipt mail template to string
* @param {ReceiptEmailTemplateProps} props
* @returns {Promise<string>}
*/
export const renderReceiptEmailTemplate = (
props: ReceiptEmailTemplateProps
) => {
return render(<ReceiptEmailTemplate {...props} />);
};
const headerInfoStyle: CSSProperties = {
textAlign: 'center',
marginBottom: 20,