wix-incubator / mjml-react

React component library to generate the HTML emails on the fly

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No matching component for tag : `mj-all`

zecka opened this issue · comments

commented

I try to use mj-all component as follow:

import React from "react";
import {  Mjml,  MjmlHead,  MjmlBody,  MjmlAll } from "mjml-react";
export const Document = ({ children }) => {
  return (
    <Mjml>
      <MjmlHead>
        <MjmlAll font-family="Arial"></MjmlAll>
      </MjmlHead>
      <MjmlBody width={500}>{children}</MjmlBody>
    </Mjml>
  );
};

But got following error: No matching component for tag : mj-all

Is supported by mjml-react ?

commented

Oups, my bad... I missed the <mj-attributes> tag

import React from "react";
import {  Mjml,  MjmlHead,  MjmlBody,  MjmlAll, MjmlAttributes } from "mjml-react";
export const Document = ({ children }) => {
  return (
    <Mjml>
      <MjmlHead>
        <MjmlAttributes>
          <MjmlAll font-family="Arial"></MjmlAll>
        </MjmlAttributes>
      </MjmlHead>
      <MjmlBody width={500}>{children}</MjmlBody>
    </Mjml>
  );
};

mjmlio/mjml#1119