import ngModule from '../../module'; import './style.scss'; export default class IconButton { constructor($element) { $element[0].tabIndex = 0; $element.on("keyup", event => this.onKeyDown(event, $element)); } onKeyDown(event, $element) { if (event.defaultPrevented) return; if (event.keyCode == 13) { event.preventDefault(); $element.triggerHandler('click'); } } } IconButton.$inject = ['$element']; ngModule.component('vnIconButton', { controller: IconButton, template: require('./icon-button.html'), bindings: { icon: '@', className: '@?', enabled: '