coveo-search-ui-extensions
Version:
Small generic components to extend the functionality of Coveo's Search UI framework.
37 lines (36 loc) • 1.51 kB
TypeScript
import { IResultsComponentBindings, Component } from 'coveo-search-ui';
import { IToggleableButton, IToggleableButtonOptions } from './ToggleableButton';
import { IDisableableButton, IDisableableButtonOptions } from './DisableableButton';
export interface IDisableableToggleActionButtonOptions extends IToggleableButtonOptions, IDisableableButtonOptions {
}
export declare class DisableableToggleActionButton extends Component implements IToggleableButton, IDisableableButton {
element: HTMLElement;
options: IDisableableToggleActionButtonOptions;
bindings?: IResultsComponentBindings;
static ID: string;
static ACTIVATED_CLASS_NAME: string;
private innerStatefulActionButton;
private activatedState;
private deactivatedState;
private disabledState;
static options: IDisableableToggleActionButtonOptions;
constructor(element: HTMLElement, options: IDisableableToggleActionButtonOptions, bindings?: IResultsComponentBindings);
/**
* Indicates whether the toggle button is in the activated state.
*/
isActivated(): boolean;
/**
* Indicates whether the disableable toggle button is in the disable state.
*/
isDisabled(): boolean;
/**
* Sets the toggle button to the specified state.
* @param activated Whether the button is activated.
*/
setActivated(activated: boolean): void;
setEnabled(enabled: boolean): void;
disable(): void;
enable(): void;
onClick(): void;
private createInnerButton;
}