wix-incubator / mjml-react

React component library to generate the HTML emails on the fly
MIT License
989 stars 50 forks source link

No matching component for tag : `mj-all` #68

Closed zecka closed 2 years ago

zecka commented 2 years ago

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 ?

zecka commented 2 years ago

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>
  );
};

https://github.com/mjmlio/mjml/issues/1119