Function generateEmail

  • Function to convert React Email Layouts to HTML.

    Returns

    HTML version of the email in string format.

    Example

    import { generateEmail } from '@leopardslab/react-email';
    import { EmailLayout } from './EmailLayout';
    const html = generateEmail(EmailLayout());
    console.log(html);

    Parameters

    • jsxElement: ReactElement<any, string | JSXElementConstructor<any>>

      React email layout which needs to be converted.

    • Optional options: GenerateEmailOptions

      An optional param options for the additional configurations.

    Returns string

Generated using TypeDoc