refactor place input out

This commit is contained in:
counterweight 2025-03-22 17:34:42 +01:00
parent bc4cb35a31
commit e95d240562
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C

View file

@ -0,0 +1,26 @@
class PlaceInput {
constructor({ parentElement, id }) {
this.element = null;
this.parentElement = parentElement;
this.id = id;
}
render() {
const placeInput = document.createElement('textarea');
placeInput.id = 'place-input';
placeInput.className = 'place-and-time-box';
placeInput.autocomplete = 'on';
placeInput.maxLength = 140;
placeInput.placeholder =
"¿Dónde? Ej.'Eixample', 'La Maquinista', 'Cualquier lugar en BCN', 'Meetup BBO'";
this.element = placeInput;
this.parentElement.appendChild(this.element);
}
get inputText() {
return this.element.value;
}
}
module.exports = PlaceInput;