Upgrades HACS
This commit is contained in:
14
www/community/lovelace-gap-card/gap-card.js
Normal file
14
www/community/lovelace-gap-card/gap-card.js
Normal file
@@ -0,0 +1,14 @@
|
||||
class GapCard extends HTMLElement {
|
||||
|
||||
setConfig(config) {
|
||||
this.height = ('height' in config) ? config.height : 50;
|
||||
this.size = ('size' in config) ? config.size : Math.ceil(this.height/50);
|
||||
this.style.setProperty('height', this.height + 'px');
|
||||
}
|
||||
|
||||
getCardSize() {
|
||||
return this.size;
|
||||
}
|
||||
}
|
||||
|
||||
customElements.define('gap-card', GapCard);
|
||||
Reference in New Issue
Block a user