feat(TouristAttractions): Adiciona código ao Js

This commit is contained in:
William Simão Cavalcante 2022-11-16 21:52:09 -03:00
parent 2a5ffb64c3
commit be5e962c53
2 changed files with 8 additions and 4 deletions

9
js.js
View File

@ -3,9 +3,9 @@ document.addEventListener('DOMContentLoaded', function () {
const inputFile = document.querySelector('#input__img');
const labelInput = document.querySelector('.label-input');
const textSpanInput = "Imagem";
const textLabelInput = "Imagem";
labelInput.innerHTML = textSpanInput;
labelInput.innerHTML = textLabelInput;
inputFile.addEventListener('change', (e) => {
const inputTarget = e.target;
@ -25,11 +25,14 @@ document.addEventListener('DOMContentLoaded', function () {
labelInput.appendChild(img);
});
reader.readAsDataURL(file);
labelInput.innerHTML = "";
labelInput.style.border = "none";
}else {
labelInput.innerHTML = textSpanInput;
labelInput.innerHTML = textLabelInput;
}
});

View File

@ -54,7 +54,8 @@
}
.img-result {
max-width: 100%;
width: 100%;
border-radius: 8px;
}
.wrapper-input__text {