UNPKG

coveo-search-ui-extensions

Version:

Small generic components to extend the functionality of Coveo's Search UI framework.

18 lines 739 B
export class DisabledState { constructor(disabledButton) { this.name = 'DisabledState'; this.onStateEntry = function () { this.element.classList.add(DisabledState.DISABLED_CLASS_NAME); this.element.setAttribute('disabled', ''); }; this.onStateExit = function () { this.element.classList.remove(DisabledState.DISABLED_CLASS_NAME); this.element.removeAttribute('disabled'); }; this.click = () => { }; this.icon = disabledButton.options.disabledIcon; this.tooltip = disabledButton.options.disabledTooltip; } } DisabledState.DISABLED_CLASS_NAME = 'coveo-actionbutton-disabled'; //# sourceMappingURL=DisableableButton.js.map