function createHint({ content, type = "info" }) {
const markdownContent = html`${marked.parse(dedent.default(content))}`;
css(markdownContent, {
"margin-block-start": 0
});
const element = html`<blockquote>${markdownContent}</blockquote>`;
const typeColors = {
info: {
backgroundColor: "rgba(24,112,240,.1)",
borderColor: "#1870f0"
},
warn: {
backgroundColor: "rgba(216,64,0,.1)",
borderColor: "#d84000"
},
error: {
backgroundColor: "rgba(186,6,51,.1)",
borderColor: "#ba0633"
},
empty: {
backgroundColor: "transparent",
borderColor: "#1870f0"
}
};
css(element, {
position: "relative",
padding: "1rem 1rem 0 1rem",
margin: "1rem 0",
"border-radius": ".25rem",
border: "1px solid #e0e0e6",
"background-color": typeColors[type]["backgroundColor"],
"border-left": `4px solid ${typeColors[type]["borderColor"]}`
});
return element;
}