UNPKG

@aqua-ds/web-components

Version:
44 lines (40 loc) 1.52 kB
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client'; const aqHelperTextCss = ".aq-helper-text{font-family:var(--font-family-basic);font-size:var(--font-size-xs);color:var(--color-paper-darker)}.aq-helper-text.has-error{color:var(--color-danger-base)}"; const AqLabel = /*@__PURE__*/ proxyCustomElement(class AqLabel extends HTMLElement { constructor(registerHost) { super(); if (registerHost !== false) { this.__registerHost(); } this.text = ''; this.isError = false; } getStyleClassMap() { return { 'aq-helper-text': true, 'has-error': this.isError, }; } render() { const cssClass = this.getStyleClassMap(); return (h("div", { key: '66ba611942fa221d87d0a72cf91d2129287a28fa', class: cssClass }, h("slot", { key: '1127e12ebb0a53cf2d5b843ee932618e92e734c3', name: "text" }))); } static get style() { return aqHelperTextCss; } }, [260, "aq-helper-text", { "text": [1], "isError": [4, "is-error"] }]); function defineCustomElement() { if (typeof customElements === "undefined") { return; } const components = ["aq-helper-text"]; components.forEach(tagName => { switch (tagName) { case "aq-helper-text": if (!customElements.get(tagName)) { customElements.define(tagName, AqLabel); } break; } }); } export { AqLabel as A, defineCustomElement as d };