UNPKG

@utrecht/web-component-library-stencil

Version:

Stencil component library bundle for the Municipality of Utrecht based on the NL Design System architecture

64 lines (63 loc) 1.98 kB
import { h } from "@stencil/core"; export class Heading { constructor() { this.level = undefined; } render() { if (this.level === 1) { return (h("h1", { class: "utrecht-heading-1" }, h("slot", null))); } else if (this.level === 2) { return (h("h2", { class: "utrecht-heading-2" }, h("slot", null))); } else if (this.level === 3) { return (h("h3", { class: "utrecht-heading-3" }, h("slot", null))); } else if (this.level === 4) { return (h("h4", { class: "utrecht-heading-4" }, h("slot", null))); } else if (this.level === 5) { return (h("h5", { class: "utrecht-heading-5" }, h("slot", null))); } else if (this.level === 6) { return (h("h6", { class: "utrecht-heading-6" }, h("slot", null))); } else { return (h("div", { class: "utrecht-heading", role: "heading", "aria-level": this.level }, h("slot", null))); } } static get is() { return "utrecht-heading"; } static get encapsulation() { return "shadow"; } static get originalStyleUrls() { return { "$": ["heading.scss"] }; } static get styleUrls() { return { "$": ["heading.css"] }; } static get properties() { return { "level": { "type": "number", "mutable": false, "complexType": { "original": "number", "resolved": "number", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "Heading level" }, "attribute": "level", "reflect": false } }; } } //# sourceMappingURL=heading.js.map