framework/ember/app/components/button-item.js

19 lines
367 B
JavaScript
Raw Normal View History

2014-12-20 14:26:46 +08:00
import Ember from 'ember';
export default Ember.View.extend({
title: '',
icon: '',
class: '',
action: null,
tagName: 'a',
classNames: ['btn'],
classNameBindings: ['class', 'disabled'],
layout: Ember.Handlebars.compile('{{#if view.icon}}{{fa-icon view.icon class="fa-fw"}} {{/if}}<span>{{view.title}}</span>'),
click: function() {
this.action();
}
});