challenge-vtex-io-daniel-mo.../react/components/Placeholder/Placeholder.tsx

9 lines
255 B
TypeScript
Raw Permalink Normal View History

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;