@cbpds/web-components
Version:
Web components for the CBP Design System.
35 lines (31 loc) • 1.14 kB
JavaScript
/*!
* CPB Design System web components - built with Stencil
*/
import { r as registerInstance, h, a as Host, g as getElement } from './index-6c11fa0c.js';
import { s as setCSSProps } from './utils-475ba472.js';
const cbpSectionCss = "cbp-section:not([hidden]){display:block}";
const CbpSectionStyle0 = cbpSectionCss;
const CbpSection = class {
constructor(hostRef) {
registerInstance(this, hostRef);
this.tag = 'none';
this.accessibilityText = undefined;
this.sx = {};
}
componentWillLoad() {
if (typeof this.sx == 'string') {
this.sx = JSON.parse(this.sx) || {};
}
setCSSProps(this.host, Object.assign({}, this.sx));
}
render() {
const Tag = this.tag;
return (h(Host, { key: '0e38e31b8e50fcbcd00efa3af888ebf292744cca' }, this.tag != 'none' ?
h(Tag, { "aria-label": this.accessibilityText }, h("slot", null))
: h("slot", null)));
}
get host() { return getElement(this); }
};
CbpSection.style = CbpSectionStyle0;
export { CbpSection as cbp_section };
//# sourceMappingURL=cbp-section.entry.js.map