mjml-text
Advanced tools
Comparing version 4.8.1 to 4.8.2
@@ -10,2 +10,10 @@ "use strict"; | ||
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); | ||
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); | ||
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); | ||
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper")); | ||
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); | ||
@@ -17,34 +25,47 @@ | ||
class MjText extends _mjmlCore.BodyComponent { | ||
getStyles() { | ||
return { | ||
text: { | ||
'font-family': this.getAttribute('font-family'), | ||
'font-size': this.getAttribute('font-size'), | ||
'font-style': this.getAttribute('font-style'), | ||
'font-weight': this.getAttribute('font-weight'), | ||
'letter-spacing': this.getAttribute('letter-spacing'), | ||
'line-height': this.getAttribute('line-height'), | ||
'text-align': this.getAttribute('align'), | ||
'text-decoration': this.getAttribute('text-decoration'), | ||
'text-transform': this.getAttribute('text-transform'), | ||
color: this.getAttribute('color'), | ||
height: this.getAttribute('height') | ||
} | ||
}; | ||
let MjText = /*#__PURE__*/function (_BodyComponent) { | ||
(0, _inherits2.default)(MjText, _BodyComponent); | ||
var _super = (0, _createSuper2.default)(MjText); | ||
function MjText() { | ||
(0, _classCallCheck2.default)(this, MjText); | ||
return _super.apply(this, arguments); | ||
} | ||
renderContent() { | ||
return ` | ||
(0, _createClass2.default)(MjText, [{ | ||
key: "getStyles", | ||
value: function getStyles() { | ||
return { | ||
text: { | ||
'font-family': this.getAttribute('font-family'), | ||
'font-size': this.getAttribute('font-size'), | ||
'font-style': this.getAttribute('font-style'), | ||
'font-weight': this.getAttribute('font-weight'), | ||
'letter-spacing': this.getAttribute('letter-spacing'), | ||
'line-height': this.getAttribute('line-height'), | ||
'text-align': this.getAttribute('align'), | ||
'text-decoration': this.getAttribute('text-decoration'), | ||
'text-transform': this.getAttribute('text-transform'), | ||
color: this.getAttribute('color'), | ||
height: this.getAttribute('height') | ||
} | ||
}; | ||
} | ||
}, { | ||
key: "renderContent", | ||
value: function renderContent() { | ||
return ` | ||
<div | ||
${this.htmlAttributes({ | ||
style: 'text' | ||
})} | ||
style: 'text' | ||
})} | ||
>${this.getContent()}</div> | ||
`; | ||
} | ||
render() { | ||
const height = this.getAttribute('height'); | ||
return height ? ` | ||
} | ||
}, { | ||
key: "render", | ||
value: function render() { | ||
const height = this.getAttribute('height'); | ||
return height ? ` | ||
${(0, _conditionalTag.default)(` | ||
@@ -58,6 +79,7 @@ <table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td height="${height}" style="vertical-align:top;height:${height};"> | ||
` : this.renderContent(); | ||
} | ||
} | ||
}]); | ||
return MjText; | ||
}(_mjmlCore.BodyComponent); | ||
} | ||
exports.default = MjText; | ||
@@ -64,0 +86,0 @@ (0, _defineProperty2.default)(MjText, "componentName", 'mj-text'); |
{ | ||
"name": "mjml-text", | ||
"description": "mjml-text", | ||
"version": "4.8.1", | ||
"version": "4.8.2", | ||
"main": "lib/index.js", | ||
@@ -26,3 +26,3 @@ "files": [ | ||
"lodash": "^4.17.15", | ||
"mjml-core": "4.8.1" | ||
"mjml-core": "4.8.2" | ||
}, | ||
@@ -33,3 +33,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "45507ebde835129ba62671d341e76bc9892552c9" | ||
"gitHead": "67cb33b5edd2b1d80436a72c213d2e815a685cd5" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8138
99
+ Addedmjml-core@4.8.2(transitive)
+ Addedmjml-migrate@4.8.2(transitive)
+ Addedmjml-parser-xml@4.8.2(transitive)
+ Addedmjml-validator@4.8.2(transitive)
- Removedmjml-core@4.8.1(transitive)
- Removedmjml-migrate@4.8.1(transitive)
- Removedmjml-parser-xml@4.8.1(transitive)
- Removedmjml-validator@4.8.1(transitive)
Updatedmjml-core@4.8.2