@cbpds/web-components
Version:
Web components for the CBP Design System.
73 lines (72 loc) • 2.75 kB
JavaScript
/*!
* CPB Design System web components - built with Stencil
*/
import { Host, h } from "@stencil/core";
import { setCSSProps } from "../../utils/utils";
export class CbpPanel {
constructor() {
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: 'd9ee3fc3a00236cb0b428ed145e98b5f39d32342' }, h("div", { key: '103d9f5641bfbaa7b455d018f52259834705f91e', class: "cbp-panel__header" }, h("slot", { key: 'ce50005b3aceca367e322991d49d9667931dd0e5', name: "cbp-panel-header" })), h("div", { key: 'a885bc5ff1a57496d28eed654f09fe81c6d900f6', class: "cbp-panel__content" }, h("slot", { key: 'c93d1cefaff9b953369e0310ef2c6e27c87d7230' }))));
}
static get is() { return "cbp-panel"; }
static get originalStyleUrls() {
return {
"$": ["cbp-panel.scss"]
};
}
static get styleUrls() {
return {
"$": ["cbp-panel.css"]
};
}
static get properties() {
return {
"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-panel.js.map