UNPKG

@cbpds/web-components

Version:
91 lines (90 loc) 3.15 kB
/*! * CPB Design System web components - built with Stencil */ import { Host, h } from "@stencil/core"; import { setCSSProps } from "../../utils/utils"; export class CbpBadge { constructor() { this.color = undefined; this.context = undefined; this.sx = {}; } componentWillLoad() { if (typeof this.sx == 'string') { this.sx = JSON.parse(this.sx) || {}; } setCSSProps(this.host, Object.assign({}, this.sx)); } render() { return (h(Host, { key: '82bdb09f322ef6d4fedb7cc1bff6a854ffe7af67' }, h("slot", { key: '37de2b5506ac3812a8fe85f908cd67d3b41f5d9f' }))); } static get is() { return "cbp-badge"; } static get originalStyleUrls() { return { "$": ["cbp-badge.scss"] }; } static get styleUrls() { return { "$": ["cbp-badge.css"] }; } static get properties() { return { "color": { "type": "string", "mutable": false, "complexType": { "original": "\"default\"| \"danger\"", "resolved": "\"danger\" | \"default\"", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "Specifies a color variant. Currently the only variant supported is \"danger\"." }, "attribute": "color", "reflect": true }, "context": { "type": "string", "mutable": false, "complexType": { "original": "\"light-inverts\" | \"light-always\" | \"dark-inverts\" | \"dark-always\"", "resolved": "\"dark-always\" | \"dark-inverts\" | \"light-always\" | \"light-inverts\"", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "Specifies the context of the component as it applies to the visual design and whether it inverts when light/dark mode is toggled. Default behavior is \"light-inverts\" and does not have to be specified." }, "attribute": "context", "reflect": true }, "sx": { "type": "any", "mutable": false, "complexType": { "original": "any", "resolved": "any", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "Supports adding inline styles as an object" }, "attribute": "sx", "reflect": false, "defaultValue": "{}" } }; } static get elementRef() { return "host"; } } //# sourceMappingURL=cbp-badge.js.map