development #17
3
react/Placeholder.ts
Normal file
3
react/Placeholder.ts
Normal file
@ -0,0 +1,3 @@
|
||||
import Placeholder from "./components/Placeholder/Placeholder";
|
||||
|
||||
export default Placeholder;
|
13
react/components/Placeholder/Placeholder.tsx
Normal file
13
react/components/Placeholder/Placeholder.tsx
Normal file
@ -0,0 +1,13 @@
|
||||
|
||||
const Placeholder = () => {
|
||||
|
||||
|
||||
|
||||
if (typeof document !== "undefined") {
|
||||
const m3Input = document.querySelector(".vtex-address-form-4-x-input");
|
||||
m3Input?.setAttribute("placeholder", "Digite seu CEP");
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
export default Placeholder;
|
@ -194,7 +194,7 @@
|
||||
"props": {
|
||||
"blockClass": "m3-shipping-simulator"
|
||||
},
|
||||
"children": ["rich-text", "shipping-simulator"]
|
||||
"children": ["rich-text", "shipping-simulator", "m3-placeholder"]
|
||||
},
|
||||
"rich-text": {
|
||||
"props": {
|
||||
|
@ -5,5 +5,11 @@
|
||||
"html": {
|
||||
"component": "html",
|
||||
"composition": "children"
|
||||
},
|
||||
"m3-placeholder": {
|
||||
"component": "Placeholder"
|
||||
},
|
||||
"m3-pix": {
|
||||
"component": "Pix"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user