@faire/mjml-react
Version:
React component library to generate the HTML emails on the fly
12 lines (11 loc) • 444 B
JavaScript
import React, { Component } from "react";
import { MjmlComment } from "./mjml-comment";
export class MjmlConditionalComment extends Component {
render() {
const { children, condition = "if gte mso 9", ...rest } = this.props;
if (children && children.toString().trim().length) {
return (React.createElement(MjmlComment, { ...rest }, `[${condition}]>${children}<![endif]`));
}
return null;
}
}