UNPKG

@kelvininc/ui-components

Version:
62 lines (61 loc) 2.18 kB
import { h, Host } from "@stencil/core"; import { isValidLabel } from "../../utils/string.helper"; export class KvFormLabel { render() { return (h(Host, { key: 'c4e38461c2b5c5857614c1bd0101e43513a411e0' }, isValidLabel(this.label) && (h("div", { key: 'b76a5f1434976e4b7cfa9f14472ad97ee264aab3', class: "label-container" }, this.required && h("span", { key: 'f13abb2a716d0ba7a3f74409ce4a54b78952fb59', class: "required" }, "*"), this.label && h("span", { key: '14062de99c40a90543bfdfa140a499705e1f641c', class: "label" }, this.label))))); } static get is() { return "kv-form-label"; } static get encapsulation() { return "shadow"; } static get originalStyleUrls() { return { "$": ["form-label.scss"] }; } static get styleUrls() { return { "$": ["form-label.css"] }; } static get properties() { return { "label": { "type": "string", "attribute": "label", "mutable": false, "complexType": { "original": "string", "resolved": "string", "references": {} }, "required": true, "optional": false, "docs": { "tags": [], "text": "(required) Form field label" }, "getter": false, "setter": false, "reflect": true }, "required": { "type": "boolean", "attribute": "required", "mutable": false, "complexType": { "original": "boolean", "resolved": "boolean", "references": {} }, "required": false, "optional": true, "docs": { "tags": [], "text": "(optional) Form field required" }, "getter": false, "setter": false, "reflect": true } }; } }