UNPKG

@kitten-science/kitten-scientists

Version:

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

20 lines 794 B
import styles from "./ExplainerLiteItem.module.css"; import { UiComponent } from "./UiComponent.js"; export class ExplainerListItem extends UiComponent { /** * Construct an element to explain an area of the UI. * This is purely for cosmetic/informational value in the UI. * * @param host - A reference to the host. * @param key - The i18n key for the text to appear on the element. * @param options - Options for this explainer. */ constructor(parent, key, options) { super(parent, { ...options }); this.element = $("<li/>", { text: parent.host.engine.i18n(key) }).addClass(styles.explainer); } toString() { return `[${ExplainerListItem.name}#${this.componentId}]`; } } //# sourceMappingURL=ExplainerListItem.js.map