Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
mjml-react-small
Advanced tools
(This is forked from Wix's mjml-react — more info why I forked this can be [found in this comment](https://github.com/wix-incubator/mjml-react/issues/52#issuecomment-881830074).)
@luma-team/mjml-react
(This is forked from Wix's mjml-react — more info why I forked this can be found in this comment.)
MJML
is a markup language created by Mailjet. But since we are using React in the rest of our app, we want to use React to create the MJML markup for emails.
Note: this does not bundle mjml
so you can use whatever version of mjml
you'd like to convert the outputted mjml-string to HTML.
Install the required dependencies first:
npm install react react-dom mjml @luma-team/mjml-react
Then you can write:
import {
renderToMjml,
Mjml,
MjmlHead,
MjmlTitle,
MjmlPreview,
MjmlBody,
MjmlSection,
MjmlColumn,
MjmlButton,
MjmlImage,
} from "@luma-team/mjml-react";
import mjml2html from "mjml";
const mjmlString = renderToMjml(
<Mjml>
<MjmlHead>
<MjmlTitle>Last Minute Offer</MjmlTitle>
<MjmlPreview>Last Minute Offer...</MjmlPreview>
</MjmlHead>
<MjmlBody width={500}>
<MjmlSection fullWidth backgroundColor="#efefef">
<MjmlColumn>
<MjmlImage src="https://static.wixstatic.com/media/5cb24728abef45dabebe7edc1d97ddd2.jpg" />
</MjmlColumn>
</MjmlSection>
<MjmlSection>
<MjmlColumn>
<MjmlButton padding="20px" backgroundColor="#346DB7">
I like it!
</MjmlButton>
</MjmlColumn>
</MjmlSection>
</MjmlBody>
</Mjml>
);
const htmlString = mjml2html(mjmlString);
And as the result you will get a nice looking email HTML (works in mobile too!)
FAQs
(This is forked from Wix's mjml-react — more info why I forked this can be [found in this comment](https://github.com/wix-incubator/mjml-react/issues/52#issuecomment-881830074).)
We found that mjml-react-small demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.