lovelace-gap-card/gap-card.js
2019-02-28 14:30:21 +01:00

15 lines
351 B
JavaScript

class GapCard extends HTMLElement {
setConfig(config) {
this.height = ('height' in config) ? config.height : 50;
this.size = ('size' in config) ? config.size : Math.ceil(this.size/50);
this.style.setProperty('height', this.height + 'px');
}
getCardSize() {
return this.size;
}
}
customElements.define('gap-card', GapCard);