@cbpds/web-components
Version:
Web components for the CBP Design System.
5 lines • 1.81 kB
JavaScript
/*!
* CPB Design System web components - built with Stencil
*/
import{p as n,H as t,h as c,c as o}from"./p-e7f1ba21.js";import{s as e}from"./p-9c1b2f31.js";const r=":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 a=r;const i=n(class n extends t{constructor(){super();this.__registerHost();this.background=undefined;this.textColor=undefined;this.width=undefined;this.sx={}}componentWillLoad(){if(typeof this.sx=="string"){this.sx=JSON.parse(this.sx)||{}}e(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 c(o,{key:"be1f7f6ada26175848aee95775a3bfcd9844ac77"},c("div",{key:"42eba3fba083db66c508b4243bf47f7660791244",class:"cbp-container--inner"},c("slot",{key:"aaf8fa7b39442bae4b1a40ae4cfcadb729c61409"})))}get host(){return this}static get style(){return a}},[4,"cbp-container",{background:[1],textColor:[1,"text-color"],width:[1],sx:[8]}]);function s(){if(typeof customElements==="undefined"){return}const n=["cbp-container"];n.forEach((n=>{switch(n){case"cbp-container":if(!customElements.get(n)){customElements.define(n,i)}break}}))}const b=i;const d=s;export{b as CbpContainer,d as defineCustomElement};
//# sourceMappingURL=cbp-container.js.map