First version

This commit is contained in:
2019-02-28 13:31:14 +01:00
commit ddd996088b
2 changed files with 55 additions and 0 deletions

14
gap-card.js Normal file
View 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.size/50);
this.style.setProperty('height', this.height + 'px');
}
getCardSize() {
return this.size;
}
}
customElements.define('gap-card', GapCard);