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

@@ -4,6 +4,7 @@ import {
Column,
Container,
Heading,
render,
Row,
Section,
Text,
@@ -143,6 +144,17 @@ export const EstimatePaymentEmail: React.FC<
);
};
/**
* Renders the estimate mail template to string
* @param {EstimatePaymentEmailProps} props
* @returns {Promise<string>}
*/
export const renderEstimateEmailTemplate = (
props: EstimatePaymentEmailProps
) => {
return render(<EstimatePaymentEmail {...props} />);
};
const headerInfoStyle: CSSProperties = {
textAlign: 'center',
marginBottom: 20,