feature/header #1

Merged
SavioCarvalhoMoraes merged 4 commits from feature/header into development 2022-12-13 22:47:37 +00:00
Showing only changes of commit bef0feb053 - Show all commits

View File

@ -8,14 +8,33 @@ export default class Header {
async init() {
await this.selectors();
console.log(this.item);
//console.log(this.item);
this.progressBarHTML();
await this.progressBarProgress();
}
async selectors() {
/*
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.header = await waitElement(".headerCheckout");
this.progressBar = await waitElement("#progressBar");
}
progressBarHTML() {
if (this.progressBar && window.innerWidth > 1024) {
this.progressBar.innerHTML = `
<ul>
<li> <div><div><p>Meu Carrinho</p><p></p></div></div> </li>
<li><div><div><p>Dados Pessoais</p><p></p></div></div></li>
<li><div><div><p>Pagamento</p><p></p></div></div></li>
</ul>
`;
}
if (this.progressBar && window.innerWidth <= 1024) {
this.progressBar.innerHTML = ``;
}
}
}