forked from M3-Academy/challenge-vtex-io
feat: adiciona o placeholder
This commit is contained in:
parent
973a3b5564
commit
741b36d69d
@ -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;
|
||||
}
|
||||
|
@ -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,8 +25,10 @@ const ProductContext = () => {
|
||||
/>
|
||||
</div>
|
||||
<div className={styles.textBox}>
|
||||
<p className={styles.textPrice}>{productContextValue?.product?.priceRange?.sellingPrice?.highPrice}</p>
|
||||
<p className={styles.textDescount}>10 % de desconto</p>
|
||||
<p className={styles.textPrice}>
|
||||
{productContextValue?.product?.priceRange?.sellingPrice?.highPrice}
|
||||
</p>
|
||||
<p className={styles.textDescount}>10 % de desconto</p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
@ -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
|
||||
},
|
||||
|
@ -0,0 +1,11 @@
|
||||
@media screen and (max-width: 1024px) {
|
||||
.flexRowContent {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
||||
.flexRowContent {
|
||||
margin-right: 40px;
|
||||
margin-left: 40px;
|
||||
}
|
@ -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 {
|
||||
|
@ -11,7 +11,6 @@
|
||||
text-align: right;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
margin-right: 40px;
|
||||
}
|
||||
|
||||
.product-identifier--productReference {
|
||||
|
Loading…
Reference in New Issue
Block a user