develop #1

Merged
SabrinaMiranda merged 24 commits from develop into main 2022-12-19 02:38:03 +00:00
2 changed files with 48 additions and 0 deletions
Showing only changes of commit b6ed53f8b9 - Show all commits

View File

@ -7,6 +7,8 @@ export default class Footer {
async init() {
await this.selectors();
this.PaymentsIconsHTML();
this.VtexPciIconHTML();
// this.onUpdate();
}
@ -14,6 +16,34 @@ export default class Footer {
//Para verificar se o carrinho está vazio e remover a prateleira de produtos:
// vocês devem olhar a doc fornecida no Desafio para aprender a usar o waitElement
this.checkoutVazio = await waitElement(".empty-cart-content");
this.paymentsIcons = await waitElement(".footerCheckout__payments");
this.vtexpciIcon = await waitElement(".footerCheckout__vtexpci");
}
PaymentsIconsHTML() {
if (this.paymentsIcons) {
this.paymentsIcons.innerHTML = `
<picture class="payments-icons">
<img class="payments-icons__img" src="https://agenciamagma.vteximg.com.br/arquivos/masterCardM3Academy.png" alt="Logo Mastercard"/>
<img class="payments-icons__img" src="https://agenciamagma.vteximg.com.br/arquivos/visaM3Academy.png" alt="Logo Visa"/>
<img class="payments-icons__img" src="https://agenciamagma.vteximg.com.br/arquivos/amexM3Academy.png" alt="Logo American Express"/>
<img class="payments-icons__img" src="https://agenciamagma.vteximg.com.br/arquivos/eloM3Academy.png" alt="Logo Elo"/>
<img class="payments-icons__img" src="https://agenciamagma.vteximg.com.br/arquivos/hiperCardM3Academy.png" alt="Logo Hipercard"/>
<img class="payments-icons__img" src="https://agenciamagma.vteximg.com.br/arquivos/payPalM3Academy.png" alt="Logo PayPal"/>
<img class="payments-icons__img" src="https://agenciamagma.vteximg.com.br/arquivos/boletoM3Academy.png" alt="Logo Boleto"/>
</picture>
`;
}
}
VtexPciIconHTML() {
if (this.vtexpciIcon) {
this.vtexpciIcon.innerHTML = `
<picture class="vtexpci-icon">
<img class="vtexpci-icon__img" src="https://agenciamagma.vteximg.com.br/arquivos/vtexPCIM3Academy.png" alt="Ícone Vtex PCI"/>
</picture>
`;
}
}
onUpdate() {

View File

@ -44,12 +44,30 @@
margin-bottom: 12px;
}
.payments-icons {
display: flex;
gap: 13px;
&__img {
width: auto;
height: 20px;
}
}
&__divider {
background-color: $color-gray6;
display: inline-block;
height: 24px;
margin: 0 8px;
width: 1px;
margin: 0 10px 0 13px;
}
.vtexpci-icon {
&__img {
width: auto;
height: 33px;
}
}
}