@hashicorp/hashi-callouts
Advanced tools
Comparing version 2.1.1-fonts.0 to 2.1.2-fonts.0
@@ -61,2 +61,3 @@ 'use strict'; | ||
var data = reshapePreactComponents.decode(this.props._data); | ||
var markedOptions = this.generateMarkedOptions(); | ||
@@ -80,2 +81,3 @@ var getCalloutContent = function getCalloutContent(item) { | ||
preact.h('h3', { | ||
'class': 'g-type-display-3', | ||
dangerouslySetInnerHTML: { | ||
@@ -88,3 +90,3 @@ __html: marked.inlineLexer(item.title, []) | ||
dangerouslySetInnerHTML: { | ||
__html: item.description ? marked(item.description) : '' | ||
__html: item.description ? marked(item.description, markedOptions) : '' | ||
} | ||
@@ -99,3 +101,5 @@ }) | ||
'div', | ||
{ 'class': 'callout-button ' + (theme || '') }, | ||
{ | ||
'class': 'g-type-buttons-and-standlone-links callout-button ' + (theme || '') | ||
}, | ||
preact.h( | ||
@@ -137,2 +141,13 @@ 'span', | ||
} | ||
}, { | ||
key: 'generateMarkedOptions', | ||
value: function generateMarkedOptions() { | ||
var markedRenderer = new marked.Renderer(); | ||
markedRenderer.paragraph = function (text) { | ||
return '<p class="g-type-body-small">' + text + '</p>'; | ||
}; | ||
return { renderer: markedRenderer }; | ||
} | ||
}]); | ||
@@ -139,0 +154,0 @@ |
{ | ||
"name": "@hashicorp/hashi-callouts", | ||
"description": "a set of three horizontally-aligned images paired with a short title and descriptive text.", | ||
"version": "2.1.1-fonts.0", | ||
"version": "2.1.2-fonts.0", | ||
"author": "Hashicorp - Jeff Escalante", | ||
@@ -21,3 +21,3 @@ "main": "dist", | ||
}, | ||
"gitHead": "6dd619e0dab746f5b78f983f8f2afaff7dccd394" | ||
"gitHead": "c1a627e45f3a8773fe95eb71961eaabcf5388e4a" | ||
} |
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
12105
310