feat: ajuste na logo e adicionando o html

This commit is contained in:
Matheus Mariosa 2022-12-20 17:36:37 -03:00
parent 30555d9098
commit 2284341c74
3 changed files with 26 additions and 9 deletions

View File

@ -4,18 +4,31 @@ import { waitElement } from "m3-utils";
export default class Header {
constructor() {
this.init();
this.ProgresseBar.bind(this);
}
async init() {
await this.selectors();
console.log(this.item);
this.ProgresseBar();
}
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.barHTML = await waitElement(".progress-bar");
}
ProgresseBar() {
this.barHTML.innerHTML = `
<ul>
<li class="conteiner-progressBar">
<div class="conteinerItems"><p class="textBar">Meu Carrinho</p><div class="circle"></div></div>
</li>
<li class="conteiner-progressBar">
<div class="conteinerItems"><p class="textBar">Meu Carrinho</p><div class="circle"></div></div>
</li>
<li class="conteiner-progressBar">
<div class="conteinerItems"><p class="textBar">Meu Carrinho</p><div class="circle"></div></div>
</li>
</ul>
`;
}
}

View File

@ -1,5 +1,6 @@
/* _header.scss */
.headerCheckout {
border-bottom: 1px solid #000;
.container {
width: auto !important;
}
@ -7,12 +8,12 @@
align-items: center;
display: flex;
justify-content: space-between;
}
margin: 29px 0;
};
&__logo {
img {
height: 52px;
width: auto;
height: 37.14px;
}
}
@ -33,4 +34,5 @@
margin-right: 8px;
}
}
}

2
package-lock.json generated
View File

@ -45,6 +45,7 @@
"jquery": "^3.6.0",
"m3-utils": "^0.1.0",
"sass": "^1.38.1",
"slick-carousel": "^1.8.1",
"terser-webpack-plugin": "^5.1.4"
},
"devDependencies": {
@ -19345,6 +19346,7 @@
"m3-utils": "^0.1.0",
"prettier": "^2.3.2",
"sass": "^1.38.1",
"slick-carousel": "^1.8.1",
"terser-webpack-plugin": "^5.1.4",
"webpack": "^5.51.1",
"webpack-merge": "^5.8.0"