@doku-dev/doku-fragment
Version:
A new Angular UI library that moving away from Bootstrap and built from scratch.
46 lines (45 loc) • 1.5 kB
TypeScript
import { NgClass } from '@angular/common';
import { ElementRef } from '@angular/core';
import * as i0 from "@angular/core";
export declare class DokuButton {
private elementRef;
/**
* Variant of the button.
*
* @default `primary`
*/
variant: 'primary' | 'secondary' | 'text' | 'normal';
/**
* Size of the button.
*
* @default `medium`
*/
size: 'small' | 'medium' | 'large';
/**
* Whether button should be disabled.
*
* @default false
*/
disabled: boolean;
/**
* Whether button should be on loading state.
*
* If `true`, the button cannot be clicked.
*
* When `disabled` and `loading` are true, the `disabled` will take precedence.
*
* @default false
*/
loading: boolean;
constructor(elementRef: ElementRef);
protected get element(): HTMLElement;
protected get classes(): NgClass['ngClass'];
/**
* Provide native `disabled` attribute to prevent button from being clicked.
*/
protected get disabledAttribute(): boolean | null;
protected get isIconOnly(): boolean;
protected onClick(e: Event): void;
static ɵfac: i0.ɵɵFactoryDeclaration<DokuButton, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<DokuButton, "button[doku-button], a[doku-button]", ["dokuButton"], { "variant": "variant"; "size": "size"; "disabled": "disabled"; "loading": "loading"; }, {}, never, ["[icon-left]", "*", "[icon-right]"], true>;
}