bruno-ui
Version:
Bruno UI Kit
25 lines (20 loc) • 882 B
JavaScript
;
Object.defineProperty(exports, '__esModule', { value: true });
const core = require('./core-a98adf17.js');
const ColumnComponent = class {
constructor(hostRef) {
core.registerInstance(this, hostRef);
}
render() {
this._el.style.width = `${this.CalculateWidth()}%`;
return (core.h("div", null, core.h("slot", null)));
}
CalculateWidth() {
return this.total > 0 && this.columns > 0
? (this.columns * 100) / this.total
: 0;
}
get _el() { return core.getElement(this); }
static get style() { return "brn-column {\n display: block;\n padding: 0 0.5rem;\n position: relative;\n}\nbrn-column > .div {\n width: 100%;\n height: 100%;\n}\nbrn-column:first-child {\n padding-left: 0;\n}\nbrn-column:last-child {\n padding-right: 0;\n}"; }
};
exports.brn_column = ColumnComponent;