@kitten-science/kitten-scientists
Version:
Add-on for the wonderful incremental browser game: https://kittensgame.com/web/
32 lines • 1.14 kB
TypeScript
import type { IconButtonOptions } from "./IconButton.js";
import { UiComponent } from "./UiComponent.js";
export type ButtonOptions = ThisType<Button> & IconButtonOptions & {
readonly border?: boolean;
readonly alignment?: "left" | "right";
readonly title?: string;
readonly classes?: Array<string>;
};
/**
* A button that has a label and can optionally have an SVG icon.
*/
export declare class Button extends UiComponent {
readonly options: ButtonOptions;
protected readonly _iconElement: JQuery | undefined;
readOnly: boolean;
inactive: boolean;
ineffective: boolean;
/**
* Constructs a `Button`.
*
* @param host - A reference to the host.
* @param label - The text to display on the button.
* @param pathData - The SVG path data of the icon.
* @param options - Options for the icon button.
*/
constructor(parent: UiComponent, label: string, pathData?: string | null, options?: ButtonOptions);
toString(): string;
updateLabel(label: string): void;
updateTitle(title: string): void;
click(): Promise<void>;
}
//# sourceMappingURL=Button.d.ts.map