feature/challenge-vtex-io #2

Merged
LeonardoPereiraRocha merged 8 commits from feature/challenge-vtex-io into master 2023-02-11 00:38:57 +00:00
6 changed files with 77 additions and 9 deletions
Showing only changes of commit 741b36d69d - Show all commits

View File

@ -414,6 +414,7 @@
text-align: center;
text-decoration-line: line-through;
}
[class*="vtex-slider-layout-0-x-slide--shelf "]
:global(.vtex-store-components-3-x-installmentsPrice) {
font-size: 0;
@ -439,3 +440,43 @@
text-align: center;
color: #575757;
}
[class*="subscriberContainer"] :global(.vtex-store-components-3-x-title) {
font-size: 0;
}
[class*="subscriberContainer"]
:global(.vtex-store-components-3-x-title)::after {
content: "Produto Indisponível";
font-family: "Open Sans";
font-style: normal;
font-weight: 700;
font-size: 16px;
line-height: 19px;
display: flex;
align-items: center;
font-weight: bold;
color: #868686;
}
[class*="subscriberContainer"]
:global(.vtex-store-components-3-x-subscribeLabel) {
font-size: 0;
}
[class*="subscriberContainer"]
:global(.vtex-store-components-3-x-subscribeLabel)::after {
content: "Deseja saber quando estiver disponível?";
font-family: "Open Sans";
font-style: normal;
font-weight: 700;
font-size: 14px;
line-height: 19px;
display: flex;
align-items: center;
color: #868686;
}
[class*="container--home"] {
width: 94.44%;
margin-right: auto;
margin-left: auto;
}

View File

@ -1,10 +1,20 @@
import React from "react";
import React, { useEffect } from "react";
import { useProduct } from "vtex.product-context";
import styles from './styles.css'
import styles from "./styles.css";
const ProductContext = () => {
useEffect(() => {
const intervalId = setInterval(() => {
const cepInput = document.querySelector(".vtex-address-form-4-x-input");
if (cepInput) {
cepInput.setAttribute("placeholder", "Digite seu CEP");
console.log(cepInput);
clearInterval(intervalId);
}
}, 50);
}, []);
const productContextValue = useProduct();
console.log(productContextValue);
return (
<div className={styles.pixWrapper}>
@ -15,7 +25,9 @@ const ProductContext = () => {
/>
</div>
<div className={styles.textBox}>
<p className={styles.textPrice}>{productContextValue?.product?.priceRange?.sellingPrice?.highPrice}</p>
<p className={styles.textPrice}>
{productContextValue?.product?.priceRange?.sellingPrice?.highPrice}
</p>
<p className={styles.textDescount}>10 % de desconto</p>
</div>
</div>

View File

@ -127,14 +127,13 @@
},
"product-images": {
"props": {
"width": "40%",
"contentType": "images",
"showNavigationArrows": false,
"showPaginationDots": false,
"thumbnailsOrientation": "horizontal",
"aspectRatio": {
"desktop": "auto",
"phone": "16:9"
"phone": "auto"
},
"displayThumbnailsArrows": true
}
@ -154,7 +153,6 @@
"flex-layout.col#right-col": {
"props": {
"width": "60%",
"preventVerticalStretch": true,
"rowGap": 0
},

View File

@ -0,0 +1,11 @@
@media screen and (max-width: 1024px) {
.flexRowContent {
display: flex;
flex-direction: column;
}
}
.flexRowContent {
margin-right: 40px;
margin-left: 40px;
}

View File

@ -3,6 +3,13 @@
padding: 0 0.5rem;
}
@media screen and (max-width: 1024px) {
.flexRowContent {
display: flex;
flex-direction: column;
}
}
@media screen and (min-width: 40em) {
.flexRowContent--menu-link,
.flexRowContent--main-header {

View File

@ -11,7 +11,6 @@
text-align: right;
position: absolute;
right: 0;
margin-right: 40px;
}
.product-identifier--productReference {