@limetech/lime-elements
Version:
84 lines (83 loc) • 3 kB
JavaScript
import { h, Host } from "@stencil/core";
/**
* Help content
* This is scrollable content that is placed in the popover of the Help component.
* Moved here mostly to avoid having inlined styles in the parent component.
* Since you cannot send styles to the Portal component, we need to have this
* child component.
*
* @private
*/
export class HelpContent {
constructor() {
this.renderReadMoreLink = () => {
var _a, _b, _c, _d;
if (!this.readMoreLink) {
return;
}
return (h("span", null, h("a", { href: (_a = this.readMoreLink) === null || _a === void 0 ? void 0 : _a.href, target: (_b = this.readMoreLink) === null || _b === void 0 ? void 0 : _b.target, title: (_c = this.readMoreLink) === null || _c === void 0 ? void 0 : _c.title, tabindex: "0" }, (_d = this.readMoreLink) === null || _d === void 0 ? void 0 : _d.text)));
};
}
render() {
return (h(Host, { key: '6f52a747b64fe7136596a1edb660cd030021f473' }, h("limel-markdown", { key: '7c0913d1a8c39d38f392529ee8fd4a1531aae638', value: this.value }), this.renderReadMoreLink()));
}
static get is() { return "limel-help-content"; }
static get encapsulation() { return "shadow"; }
static get originalStyleUrls() {
return {
"$": ["limel-help-content.scss"]
};
}
static get styleUrls() {
return {
"$": ["limel-help-content.css"]
};
}
static get properties() {
return {
"value": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"getter": false,
"setter": false,
"reflect": false,
"attribute": "value"
},
"readMoreLink": {
"type": "unknown",
"mutable": false,
"complexType": {
"original": "Link",
"resolved": "Link",
"references": {
"Link": {
"location": "import",
"path": "../../global/shared-types/link.types",
"id": "src/global/shared-types/link.types.ts::Link",
"referenceLocation": "Link"
}
}
},
"required": false,
"optional": true,
"docs": {
"tags": [],
"text": ""
},
"getter": false,
"setter": false
}
};
}
}