@cbpds/web-components
Version:
Web components for the CBP Design System.
37 lines (33 loc) • 1.53 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 cbpGridItemCss = "cbp-grid-item:not([hidden]){display:inherit;position:relative;max-width:100%}";
const CbpGridItemStyle0 = cbpGridItemCss;
const CbpGridItem = class {
constructor(hostRef) {
registerInstance(this, hostRef);
this.gridColumnStart = undefined;
this.gridColumnEnd = undefined;
this.gridRowStart = undefined;
this.gridRowEnd = undefined;
this.alignSelf = undefined;
this.justifySelf = undefined;
this.gridArea = undefined;
this.sx = {};
}
componentWillLoad() {
if (typeof this.sx == 'string') {
this.sx = JSON.parse(this.sx) || {};
}
setCSSProps(this.host, Object.assign({ 'grid-column-start': this.gridColumnStart, 'grid-column-end': this.gridColumnEnd, 'grid-row-start': this.gridRowStart, 'grid-row-end': this.gridRowEnd, 'align-self': this.alignSelf, 'justify-self': this.justifySelf, 'grid-area': this.gridArea }, this.sx));
}
render() {
return (h(Host, { key: '73e18fd2866118b68da0963975f32c109cc8fd19' }, h("slot", { key: '90bb5eabe8d0ee9a3370d1b4a622f2fc6fdeed4d' })));
}
get host() { return getElement(this); }
};
CbpGridItem.style = CbpGridItemStyle0;
export { CbpGridItem as cbp_grid_item };
//# sourceMappingURL=cbp-grid-item.entry.js.map