challenge-vtex-io-caina/react/components/SetPlaceholder/SetPlaceholder.tsx

17 lines
372 B
TypeScript
Raw Normal View History

import React from "react";
const SetPlaceholder = () => {
setTimeout(() => {
if (typeof document !== "undefined") {
setTimeout(() => {
const input = document.querySelector(".vtex-address-form-4-x-input");
input?.setAttribute("placeholder", "Digite seu CEP");
}, 100);
}
}, 100);
return <></>;
};
export default SetPlaceholder;