develop #1

Merged
SabrinaMiranda merged 24 commits from develop into main 2022-12-19 02:38:03 +00:00
Showing only changes of commit a4845808d9 - Show all commits

View File

@ -8,14 +8,58 @@ export default class Header {
async init() {
await this.selectors();
console.log(this.item);
//console.log(this.item);
this.progressBarHTML();
}
async selectors() {
this.item = await waitElement("#my-element", {
/*this.item = await waitElement("#my-element", {
//#my-element pode ser a class ou o id do elemento html qeu vocÊ quer pegar
timeout: 5000, // vai esperar 5 segundos antes de rejeitar a promise
interval: 1000, // vai verificar a cada 1 segundo se o elemento existe
});
});*/
this.progressBar = await waitElement("#progressBar");
}
progressBarHTML() {
if(this.progressBar && window.innerWidth >1024) {
this.progressBar.innerHTML = `
<ul>
<li>
<div class="container-li">
<div>
<p class="progress-bar-text">Meu Carrinho</p>
<p id="progress-bar-circle-1" class="progress-bar-circle-1"></p>
<p class="progress-bar-line-1"></p>
</div>
</div>
</li>
<li class="progress-bar-center">
<div ss="container-li">
<div>
<p class="progress-bar-text">Dados Pessoais</p>
<p id="progress-bar-circle-2" class="progress-bar-circle-2"></p>
</div>
</div>
</li>
<li>
<div class="container-li">
<div>
<p class="progress-bar-text">Pagamento</p>
<p id="progress-bar-circle-3" class="progress-bar-circle-3"></p>
<p class="progress-bar-line-3"></p>
</div>
</div>
</li>
</ul>
`;
}
if(this.progressBar && window.innerWidth <= 1024) {
this.progressBar.innerHTML = "";
}
}
}