UNPKG

@kelvininc/ui-components

Version:
59 lines (58 loc) 2.06 kB
import { Host, h } from "@stencil/core"; import { EBadgeState } from "./badge.types"; /** * @part badge - The badge. */ export class KvBadge { constructor() { /** (optional) Defines the badge state.*/ this.state = EBadgeState.None; } render() { return (h(Host, { key: 'de71abce325ae677cf19e0d4155386eacbbc4a59' }, h("span", { key: '3da24a667078bb7358a5fcf0c55c564c955e1dc2', class: `badge badge--state-${this.state}`, part: "badge" }, h("slot", { key: '2fecfb13d5d4a2b88d41dc4b9c97f4b4b45f0baf' })))); } static get is() { return "kv-badge"; } static get encapsulation() { return "shadow"; } static get originalStyleUrls() { return { "night": ["badge.night.scss"], "light": ["badge.light.scss"] }; } static get styleUrls() { return { "night": ["badge.night.css"], "light": ["badge.light.css"] }; } static get properties() { return { "state": { "type": "string", "attribute": "state", "mutable": false, "complexType": { "original": "EBadgeState", "resolved": "EBadgeState.Error | EBadgeState.Info | EBadgeState.None | EBadgeState.Success | EBadgeState.Warning", "references": { "EBadgeState": { "location": "import", "path": "./badge.types", "id": "src/components/badge/badge.types.ts::EBadgeState" } } }, "required": false, "optional": false, "docs": { "tags": [], "text": "(optional) Defines the badge state." }, "getter": false, "setter": false, "reflect": true, "defaultValue": "EBadgeState.None" } }; } }