Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from wix-incubator:master #4

Merged
merged 3 commits into from
Feb 24, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
add mjml-attributes, mjml-selector and mjml-html-attribute (wix-incub…
  • Loading branch information
philipwindeyer committed Feb 24, 2022
commit e72830ac6f7d53e3ca5fd3a3c494658dbdf3cc3b
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@
"devDependencies": {
"babel-plugin-transform-runtime": "~6.23.0",
"chai": "~4.1.0",
"mjml": "^4.6.3",
"mjml": "^4.7.0",
"mjml2json": "^1.0.1",
"puppeteer": "^1.4.0",
"react": "^17.0.0",
"react-dom": "^17.0.0",
"@wix/yoshi": "^4.186.0"
},
"peerDependencies": {
"mjml": "^4.1.2",
"mjml": "^4.7.0",
"react": "^17.0.0",
"react-dom": "^17.0.0"
},
Expand Down
3 changes: 3 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,15 @@ export { MjmlFont } from './mjml-font';
export { MjmlGroup } from './mjml-group';
export { MjmlHead } from './mjml-head';
export { MjmlHero } from './mjml-hero';
export { MjmlHtmlAttributes } from './mjml-html-attributes';
export { MjmlHtmlAttribute } from './mjml-html-attribute';
export { MjmlImage } from './mjml-image';
export { MjmlNavbar } from './mjml-navbar';
export { MjmlNavbarLink } from './mjml-navbar-link';
export { MjmlPreview } from './mjml-preview';
export { MjmlRaw } from './mjml-raw';
export { MjmlSection } from './mjml-section';
export { MjmlSelector } from './mjml-selector';
export { MjmlSocial } from './mjml-social';
export { MjmlSocialElement } from './mjml-social-element';
export { MjmlSpacer } from './mjml-spacer';
Expand Down
19 changes: 19 additions & 0 deletions src/mjml-html-attribute.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React, { Component } from "react";
import { node } from "prop-types";

import { handleMjmlProps } from "./utils";

export class MjmlHtmlAttribute extends Component {
static propTypes = {
children: node,
};

render() {
const { children, ...rest } = this.props;
return React.createElement(
"mj-html-attribute",
handleMjmlProps(rest),
children
);
}
}
19 changes: 19 additions & 0 deletions src/mjml-html-attributes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React, { Component } from "react";
import { node } from "prop-types";

import { handleMjmlProps } from "./utils";

export class MjmlHtmlAttributes extends Component {
static propTypes = {
children: node,
};

render() {
const { children, ...rest } = this.props;
return React.createElement(
"mj-html-attributes",
handleMjmlProps(rest),
children
);
}
}
15 changes: 15 additions & 0 deletions src/mjml-selector.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import React, { Component } from "react";
import { node } from "prop-types";

import { handleMjmlProps } from "./utils";

export class MjmlSelector extends Component {
static propTypes = {
children: node,
};

render() {
const { children, ...rest } = this.props;
return React.createElement("mj-selector", handleMjmlProps(rest), children);
}
}