UNPKG

921 BTypeScriptView Raw
1import { OnInit } from '@angular/core';
2import { ControlValueAccessor } from '@angular/forms';
3export declare const CHECKBOX_CONTROL_VALUE_ACCESSOR: any;
4/**
5 * Add checkbox functionality to any element
6 */
7export declare class ButtonCheckboxDirective implements ControlValueAccessor, OnInit {
8 /** Truthy value, will be set to ngModel */
9 btnCheckboxTrue: any;
10 /** Falsy value, will be set to ngModel */
11 btnCheckboxFalse: any;
12 state: boolean;
13 protected value: any;
14 protected isDisabled: boolean;
15 protected onChange: any;
16 protected onTouched: any;
17 onClick(): void;
18 ngOnInit(): any;
19 protected readonly trueValue: boolean;
20 protected readonly falseValue: boolean;
21 toggle(state: boolean): void;
22 writeValue(value: any): void;
23 setDisabledState(isDisabled: boolean): void;
24 registerOnChange(fn: (_: any) => {}): void;
25 registerOnTouched(fn: () => {}): void;
26}