challenge-vtex-io-naian-felix/react/placeholder.tsx

17 lines
355 B
TypeScript
Raw Permalink Normal View History

2023-02-07 17:59:10 +00:00
import React, { useEffect } from "react";
const placeholder = () => {
useEffect(() => {
setTimeout(() => {
const selectorInput = document.querySelector(
".vtex-address-form-4-x-input"
);
selectorInput?.setAttribute("placeholder", "Digite seu CEP");
}, 1000);
}, []);
return <></>;
};
export default placeholder;