Entrega do Desafio #1

Merged
anacarolinaduartecavalcante merged 93 commits from feature/challenge-vtex-io into develop 2023-02-03 17:14:03 +00:00
4 changed files with 35 additions and 12 deletions
Showing only changes of commit cc7985610f - Show all commits

3
react/Placeholder.tsx Normal file
View File

@ -0,0 +1,3 @@
import Placeholder from "./components/Placeholder/Placeholder";
export default Placeholder;

View File

@ -0,0 +1,17 @@
const Placeholder = () => {
if (typeof document !== "undefined") {
const postalCodeInput = document.querySelector(
".vtex-address-form-4-x-input"
);
const postalCodeValue = document.querySelector(".postalCode");
if (postalCodeInput) {
postalCodeInput.classList.add("postalCode");
}
if (postalCodeValue) {
postalCodeValue.setAttribute("placeholder", "Digite seu CEP");
}
}
return null;
};
export default Placeholder;

View File

@ -5,8 +5,8 @@
"condition-layout.product#availability", "condition-layout.product#availability",
// "flex-layout.row#description", // "flex-layout.row#description",
"tab-layout#description", "tab-layout#description",
"flex-layout.row#specifications-title", // "flex-layout.row#specifications-title",
"product-specification-group#table", // "product-specification-group#table",
"shelf.relatedProducts", "shelf.relatedProducts",
"product-questions-and-answers" "product-questions-and-answers"
] ]
@ -19,14 +19,14 @@
}, },
"children": ["breadcrumb"] "children": ["breadcrumb"]
}, },
"flex-layout.row#specifications-title": { // "flex-layout.row#specifications-title": {
"children": ["rich-text#specifications"] // "children": ["rich-text#specifications"]
}, // },
"rich-text#specifications": { // "rich-text#specifications": {
"props": { // "props": {
"text": "##### Product Specifications" // "text": "##### Product Specifications"
} // }
}, // },
"condition-layout.product#availability": { "condition-layout.product#availability": {
"props": { "props": {
@ -210,7 +210,8 @@
"product-gifts", "product-gifts",
// "flex-layout.row#buy-button", // "flex-layout.row#buy-button",
"availability-subscriber", "availability-subscriber",
"shipping-simulator" "shipping-simulator",
"placeholder-component"
// "share#default" // "share#default"
] ]
}, },
@ -306,4 +307,3 @@
} }
} }
} }

View File

@ -11,5 +11,8 @@
}, },
"pix-component": { "pix-component": {
"component": "Pix" "component": "Pix"
},
"placeholder-component": {
"component": "Placeholder"
} }
} }