UNPKG

@kitten-science/kitten-scientists

Version:

Add-on for the wonderful incremental browser game: https://kittensgame.com/web/

24 lines 795 B
import stylesDelimiter from "./Delimiter.module.css"; import { UiComponent } from "./UiComponent.js"; export class ListItem extends UiComponent { /** * Construct a new simple list item with only a container element. * * @param host The userscript instance. * @param options Options for the list item. */ constructor(parent, options) { super(parent, { ...options }); this.element = $("<li/>"); for (const className of options?.classes ?? []) { this.element.addClass(className); } if (options?.delimiter === true) { this.element.addClass(stylesDelimiter.delimiter); } } toString() { return `[${ListItem.name}#${this.componentId}]`; } } //# sourceMappingURL=ListItem.js.map