ng-cornerstone
Version:
[](https://github.com/prettier/prettier) [](http://commitizen.git
51 lines (50 loc) • 2.37 kB
TypeScript
import { ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy } from '@angular/core';
import { Observable, Subject } from 'rxjs';
import { BooleanInput } from '@angular/cdk/coercion';
import * as i0 from "@angular/core";
export type ButtonType = 'primary' | 'default';
export type ButtonContent = 'icon-text' | 'icon' | 'text' | 'default';
export type ButtonShape = 'circle' | 'round' | 'default';
export type ButtonSize = 'large' | 'default' | 'small';
export interface ButtonToggleChange {
source: ButtonComponent;
pressed: boolean;
}
export declare class ButtonComponent implements OnDestroy {
_elementRef: ElementRef;
private cd;
disabled: boolean;
tabIndex: number | string | null;
type: ButtonType;
shape: ButtonShape;
content: ButtonContent;
size: ButtonSize;
isToggle: boolean;
icon: string | null;
text: string | null;
value: any;
onClick(event: any): void;
/**
* Emits whenever button pressed state change
**/
readonly pressedChange: EventEmitter<boolean>;
protected readonly _pressedChange$: Subject<ButtonToggleChange>;
get pressedChange$(): Observable<ButtonToggleChange>;
/**
* Controls button pressed state
**/
get pressed(): boolean;
set pressed(value: boolean);
protected _pressed: boolean;
static ngAcceptInputType_pressed: BooleanInput;
private destroy$;
constructor(_elementRef: ElementRef, cd: ChangeDetectorRef);
_getHostElement(): any;
ngOnDestroy(): void;
/**
* @docs-private
*/
_updatePressed(value: boolean): void;
static ɵfac: i0.ɵɵFactoryDeclaration<ButtonComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "button[nc-button], a[nc-button]", ["ncButton"], { "disabled": { "alias": "disabled"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "type": { "alias": "type"; "required": false; }; "shape": { "alias": "shape"; "required": false; }; "content": { "alias": "content"; "required": false; }; "size": { "alias": "size"; "required": false; }; "isToggle": { "alias": "isToggle"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "text": { "alias": "text"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "pressedChange": "pressedChange"; }, never, ["*"], false, never>;
}