MapComplete/UI/Base/DivContainer.ts
Pieter Vander Vennet 41e6a2c760 More refactoring
2023-03-29 17:21:20 +02:00

19 lines
459 B
TypeScript

import BaseUIElement from "../BaseUIElement"
/**
* Introduces a new element which has an ID
* Mostly a workaround for the import viewer
*/
export default class DivContainer extends BaseUIElement {
private readonly _id: string
constructor(id: string) {
super()
this._id = id
}
protected InnerConstructElement(): HTMLElement {
const e = document.createElement("div")
e.id = this._id
return e
}
}