JS/TP04/EX03/modules/loader.js

16 lines
217 B
JavaScript
Raw Permalink Normal View History

2024-03-08 16:34:15 +01:00
class loader {
div = null
constructor(node){
this.div = node
}
set(loading){
if (loading)
this.div.classList.add("is-loading")
else
this.div.classList.remove("is-loading")
}
}
export default loader