UNPKG

@cbpds/web-components

Version:
91 lines (90 loc) 3.11 kB
/*! * CPB Design System web components - built with Stencil */ import { Host, h } from "@stencil/core"; import { setCSSProps } from "../../utils/utils"; export class CbpTag { 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: '536dbbe8ddc20183f4971da49c1fd7065973f920' }, h("slot", { key: 'a744c71b721be056d2630f5f562446e63aa86d05' }))); } static get is() { return "cbp-tag"; } static get originalStyleUrls() { return { "$": ["cbp-tag.scss"] }; } static get styleUrls() { return { "$": ["cbp-tag.css"] }; } static get properties() { return { "color": { "type": "string", "mutable": false, "complexType": { "original": "'default' | 'danger' | 'success' | 'warning'", "resolved": "\"danger\" | \"default\" | \"success\" | \"warning\"", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "" }, "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-tag.js.map