@kitten-science/kitten-scientists
Version:
Add-on for the wonderful incremental browser game: https://kittensgame.com/web/
20 lines • 636 B
JavaScript
import { UiComponent } from "./UiComponent.js";
export class Container extends UiComponent {
/**
* Constructs a simple container element without any special properties.
*
* @param host A reference to the host.
* @param options Options for the container.
*/
constructor(parent, options) {
super(parent, { ...options });
this.element = $("<div/>");
for (const className of options?.classes ?? []) {
this.element.addClass(className);
}
}
toString() {
return `[${Container.name}#${this.componentId}]`;
}
}
//# sourceMappingURL=Container.js.map