UNPKG

@kitten-science/kitten-scientists

Version:

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

23 lines 809 B
import styles from "./HeaderListItem.module.css"; import { UiComponent } from "./UiComponent.js"; export class HeaderListItem extends UiComponent { get elementLabel() { return this.element; } /** * Construct an informational text item. * This is purely for cosmetic/informational value in the UI. * * @param host A reference to the host. * @param text The text to appear on the header element. * @param options Options for the header. */ constructor(parent, text, options) { super(parent, { ...options }); this.element = $("<li/>", { text }).addClass(styles.header); } toString() { return `[${HeaderListItem.name}#${this.componentId}]: '${this.elementLabel.text()}'`; } } //# sourceMappingURL=HeaderListItem.js.map