@cbpds/web-components
Version:
Web components for the CBP Design System.
37 lines (31 loc) • 1.92 kB
JavaScript
/*!
* CPB Design System web components - built with Stencil
*/
;
Object.defineProperty(exports, '__esModule', { value: true });
const index = require('./index-cd71cbd5.js');
const utils = require('./utils-99c9e716.js');
const cbpContainerCss = ":root{--cbp-container-color-text:inherit;--cbp-container-color-background:transparent;--cbp-container-color-inner-background:var(--cbp-container-color-background);--cbp-container-content-padding:0;--cbp-container-inner-width:auto}cbp-container{display:block;color:var(--cbp-container-color-text);background:var(--cbp-container-color-background);padding:var(--cbp-container-content-padding);max-width:100%}cbp-container .cbp-container--inner{display:block;background:var(--cbp-container-color-inner-background);margin:auto;width:var(--cbp-container-inner-width)}";
const CbpContainerStyle0 = cbpContainerCss;
const CbpContainer = class {
constructor(hostRef) {
index.registerInstance(this, hostRef);
this.background = undefined;
this.textColor = undefined;
this.width = undefined;
this.sx = {};
}
componentWillLoad() {
if (typeof this.sx == 'string') {
this.sx = JSON.parse(this.sx) || {};
}
utils.setCSSProps(this.host, Object.assign({ "--cbp-container-color-text": this.textColor, "--cbp-container-color-background": this.background, "--cbp-container-inner-width": this.width }, this.sx));
}
render() {
return (index.h(index.Host, { key: 'd3646c0825f62fbb3196c0b0ac4e1560dd83eeb3' }, index.h("div", { key: '2b43031637f1670ec2186c5184b20af8285235c9', class: "cbp-container--inner" }, index.h("slot", { key: '6ac0219fbca7b5afecd19ba85983a24ac732b85b' }))));
}
get host() { return index.getElement(this); }
};
CbpContainer.style = CbpContainerStyle0;
exports.cbp_container = CbpContainer;
//# sourceMappingURL=cbp-container.cjs.entry.js.map