mirror of
https://github.com/flarum/framework.git
synced 2024-12-15 00:23:38 +08:00
24 lines
564 B
JavaScript
24 lines
564 B
JavaScript
import Ember from 'ember';
|
|
|
|
export default Ember.Component.extend({
|
|
title: '',
|
|
icon: '',
|
|
className: '',
|
|
action: null,
|
|
divider: false,
|
|
active: false,
|
|
|
|
classNames: ['btn', 'btn-default'],
|
|
|
|
tagName: 'a',
|
|
attributeBindings: ['href'],
|
|
classNameBindings: ['className'],
|
|
href: '#',
|
|
layout: Ember.Handlebars.compile('{{#if icon}}{{fa-icon icon class="fa-fw"}} {{/if}}<span>{{title}}</span>'),
|
|
|
|
click: function(e) {
|
|
e.preventDefault();
|
|
// this.sendAction('action');
|
|
this.get('action')();
|
|
}
|
|
}); |