@hashicorp/hashi-callouts
Advanced tools
Comparing version 0.0.8 to 1.0.0
@@ -9,31 +9,55 @@ 'use strict'; | ||
function Callouts(_ref) { | ||
var _state = _ref._state, | ||
_data = _ref._data; | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
var data = reshapePreactComponents.decode(_data); | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
return preact.h( | ||
'ul', | ||
{ 'class': 'g-callouts' + (data.two_columns ? ' two-columns' : '') }, | ||
data.items.map(function (item) { | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
var Callouts = function (_Component) { | ||
_inherits(Callouts, _Component); | ||
function Callouts() { | ||
_classCallCheck(this, Callouts); | ||
return _possibleConstructorReturn(this, (Callouts.__proto__ || Object.getPrototypeOf(Callouts)).apply(this, arguments)); | ||
} | ||
_createClass(Callouts, [{ | ||
key: 'render', | ||
value: function render() { | ||
var data = reshapePreactComponents.decode(this.props._data); | ||
return preact.h( | ||
'li', | ||
null, | ||
item.image && preact.h( | ||
'div', | ||
{ 'class': 'callout-icon' }, | ||
preact.h('img', { src: item.image.url, alt: item.image.alt }) | ||
), | ||
preact.h( | ||
'h5', | ||
null, | ||
item.title | ||
), | ||
item.description && marked.inlineLexer(item.description, []) | ||
'ul', | ||
{ 'class': 'g-callouts' + (data.two_columns ? ' two-columns' : '') }, | ||
data.items.map(function (item) { | ||
return preact.h( | ||
'li', | ||
null, | ||
item.image && preact.h( | ||
'div', | ||
{ 'class': 'callout-icon' }, | ||
preact.h('img', { src: item.image.url, alt: item.image.alt }) | ||
), | ||
preact.h( | ||
'h5', | ||
null, | ||
item.title | ||
), | ||
preact.h('span', { | ||
dangerouslySetInnerHTML: { | ||
__html: item.description ? marked.inlineLexer(item.description, []) : '' | ||
} | ||
}) | ||
); | ||
}) | ||
); | ||
}) | ||
); | ||
} | ||
} | ||
}]); | ||
return Callouts; | ||
}(preact.Component); | ||
module.exports = Callouts; |
{ | ||
"name": "@hashicorp/hashi-callouts", | ||
"description": "a set of three horizontally-aligned images paired with a short title and descriptive text.", | ||
"version": "0.0.8", | ||
"version": "1.0.0", | ||
"author": "Hashicorp - Jeff Escalante", | ||
"main": "dist", | ||
"peerDependencies": { | ||
"8fold-marked": "^0.3.8", | ||
"preact": "^8.2.6", | ||
"reshape-preact-components": "^0.6.0" | ||
"8fold-marked": "~0.3.8", | ||
"preact": "^8.2.7", | ||
"reshape-preact-components": "~0.6.0" | ||
}, | ||
@@ -11,0 +12,0 @@ "publishConfig": { |
Sorry, the diff of this file is not supported yet
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
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No License Found
License(Experimental) License information could not be found.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
5833
0
2
1
130