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,
@@ -135,6 +135,15 @@ export const CreditNoteEmailTemplate: React.FC<
);
};
/**
* Renders the estimate mail template to string
* @param {EstimatePaymentEmailProps} props
* @returns {Promise<string>}
*/
export const renderCreditNoteEmailTemplate = (props: CreditNoteEmailProps) => {
return render(<CreditNoteEmailTemplate {...props} />);
};
const containerStyle: CSSProperties = {
backgroundColor: '#fff',
width: '100%',