challenge-vtex-io-amanda-al.../react/components/placeholder/index.tsx

20 lines
548 B
TypeScript

import React from "react";
const PlaceholderAdd = () => {
let placeholderCep;
const CreatePlaceholder = () => {
placeholderCep = document.querySelector(
".vtex-address-form__postalCode .vtex-input .vtex-input-prefix__group .vtex-address-form-4-x-hideDecorators"
) as HTMLInputElement;
placeholderCep.placeholder = "Digite seu cep";
console.log(placeholderCep);
return placeholderCep;
};
return (
<>{document.addEventListener("DOMContentLoaded", CreatePlaceholder)}</>
);
};
export default PlaceholderAdd;