UNPKG

tgui-angular

Version:

🚀 Angular UI library for Telegram Web Apps with modern components and theming support | 💼 Author is open to work opportunities | 📧 Contact: a.blagovestnov@gmail.com | 💬 Telegram: @ablagovestnov

73 lines (72 loc) • 3.24 kB
import { OnInit, TemplateRef } from '@angular/core'; import * as i0 from "@angular/core"; /** * The Button component provides a customizable button with various styles and states. * Supports different sizes, display modes, loading state, etc. */ export declare class ButtonComponent implements OnInit { /** * Button size ('s', 'm', 'l') */ size: import("@angular/core").InputSignal<"s" | "m" | "l">; /** * Visual style of the button */ mode: import("@angular/core").InputSignal<"gray" | "white" | "filled" | "bezeled" | "plain" | "outline">; /** * If true, the button will stretch to the width of its container */ stretched: import("@angular/core").InputSignal<boolean>; /** * If true, shows a loading indicator instead of button content */ loading: import("@angular/core").InputSignal<boolean>; /** * If true, the button will be disabled */ disabled: import("@angular/core").InputSignal<boolean>; /** * Button type (for HTML type attribute) */ type: import("@angular/core").InputSignal<"button" | "reset" | "submit">; /** * Type of interactive animation ('opacity' | 'background') */ interactiveAnimation: import("@angular/core").InputSignal<"opacity" | "background">; /** * Icon name to be displayed before the content */ icon: import("@angular/core").InputSignal<string | undefined>; /** * Template for content before the main button text */ beforeTemplate?: TemplateRef<any>; /** * Template for content after the main button text */ afterTemplate?: TemplateRef<any>; get isSizeS(): boolean; get isSizeM(): boolean; get isSizeL(): boolean; get isModeFilled(): boolean; get isModeBezeled(): boolean; get isModePlain(): boolean; get isModeGray(): boolean; get isModeOutline(): boolean; get isModeWhite(): boolean; get isStretched(): boolean; get isLoading(): boolean; get isDisabled(): boolean; get buttonType(): "button" | "reset" | "submit"; get buttonDisabled(): true | null; private platformService; private elementRef; onSelectStart(event: Event): boolean; ngOnInit(): void; /** * Transforms the host element into a real HTML button for better accessibility and semantics */ private transformToButton; static ɵfac: i0.ɵɵFactoryDeclaration<ButtonComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "tgui-button", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "stretched": { "alias": "stretched"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "interactiveAnimation": { "alias": "interactiveAnimation"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; }, {}, ["beforeTemplate", "afterTemplate"], ["[tguiButtonBefore]", "*", "[tguiButtonAfter]"], true, never>; }