UNPKG

2.96 kBTypeScriptView Raw
1import { AfterViewInit, ChangeDetectorRef, ElementRef, NgZone, Renderer2 } from '@angular/core';
2import { NbStatusService } from '../../services/status.service';
3import { NbBooleanInput } from '../helpers';
4import { NbComponentSize } from '../component-size';
5import { NbComponentOrCustomStatus } from '../component-status';
6import { NbComponentShape } from '../component-shape';
7export declare type NbButtonAppearance = 'filled' | 'outline' | 'ghost' | 'hero';
8export declare type NbButtonProperties = Pick<NbButton, 'appearance' | 'size' | 'shape' | 'status' | 'disabled'> & Object;
9export declare abstract class NbButton implements AfterViewInit {
10 protected renderer: Renderer2;
11 protected hostElement: ElementRef<HTMLElement>;
12 protected cd: ChangeDetectorRef;
13 protected zone: NgZone;
14 protected statusService: NbStatusService;
15 /**
16 * Button size, available sizes:
17 * `tiny`, `small`, `medium`, `large`, `giant`
18 */
19 size: NbComponentSize;
20 /**
21 * Button status (adds specific styles):
22 * `primary`, `info`, `success`, `warning`, `danger`
23 */
24 status: NbComponentOrCustomStatus;
25 /**
26 * Button shapes: `rectangle`, `round`, `semi-round`
27 */
28 shape: NbComponentShape;
29 /**
30 * Button appearance: `filled`, `outline`, `ghost`, `hero`
31 */
32 appearance: NbButtonAppearance;
33 /**
34 * Sets `filled` appearance
35 */
36 get filled(): boolean;
37 set filled(value: boolean);
38 static ngAcceptInputType_filled: NbBooleanInput;
39 /**
40 * Sets `outline` appearance
41 */
42 get outline(): boolean;
43 set outline(value: boolean);
44 static ngAcceptInputType_outline: NbBooleanInput;
45 /**
46 * Sets `ghost` appearance
47 */
48 get ghost(): boolean;
49 set ghost(value: boolean);
50 static ngAcceptInputType_ghost: NbBooleanInput;
51 /**
52 * If set element will fill its container
53 */
54 get fullWidth(): boolean;
55 set fullWidth(value: boolean);
56 private _fullWidth;
57 static ngAcceptInputType_fullWidth: NbBooleanInput;
58 /**
59 * Disables the button
60 */
61 get disabled(): boolean;
62 set disabled(value: boolean);
63 private _disabled;
64 static ngAcceptInputType_disabled: NbBooleanInput;
65 /**
66 * Tabindex of the button.
67 */
68 tabIndex: number;
69 get tabbable(): string;
70 get tiny(): boolean;
71 get small(): boolean;
72 get medium(): boolean;
73 get large(): boolean;
74 get giant(): boolean;
75 get rectangle(): boolean;
76 get round(): boolean;
77 get semiRound(): boolean;
78 get iconLeft(): boolean;
79 get iconRight(): boolean;
80 get additionalClasses(): string[];
81 protected constructor(renderer: Renderer2, hostElement: ElementRef<HTMLElement>, cd: ChangeDetectorRef, zone: NgZone, statusService: NbStatusService);
82 ngAfterViewInit(): void;
83 /**
84 * @docs-private
85 **/
86 updateProperties(config: Partial<NbButtonProperties>): void;
87 get iconElement(): Element;
88}