Files
2015-09-08 23:05:26 -05:00

31 lines
530 B
TypeScript

import {Directive} from 'angular2/angular2';
/**
* TODO
*/
@Directive({
selector: 'button,[button]',
host: {
'[class.icon-left]': 'iconLeft',
'[class.icon-right]': 'iconRight',
'[class.icon-only]': 'iconOnly'
}
})
export class Button {
constructor() {
this.iconLeft = this.iconRight = this.iconOnly = false;
}
/**
* TODO
* @param {TODO} icon TODO
*/
registerIcon(icon) {
this.iconLeft = icon.iconLeft;
this.iconRight = icon.iconRight;
this.iconOnly = icon.iconOnly;
}
}