improves design and adds status bar to cover

This commit is contained in:
Mathias Scherer
2021-04-05 13:14:30 +02:00
parent fcc4430bf9
commit 01f04f5db5
2 changed files with 40 additions and 0 deletions

View File

@@ -11,4 +11,20 @@ class Cover extends Slider {
position: this.sliderState,
});
}
render() {
super.render()
const container = document.getElementById(this.id)
if(container) {
const status = document.createElement('div')
status.classList.add('status')
status.style.height = `${this.state}%`
if(this.state === 100) {
status.classList.add('full')
}
container.appendChild(status)
}
}
}