No matching component for tag : `mj-all`
zecka opened this issue · comments
zecka 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 ?
zecka 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>
);
};