mirror of
https://github.com/flarum/core.git
synced 2025-08-10 02:17:37 +02:00
Big component restructure/overhaul
This commit is contained in:
24
ember/app/components/ui/controls/action-button.js
Normal file
24
ember/app/components/ui/controls/action-button.js
Normal file
@@ -0,0 +1,24 @@
|
||||
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')();
|
||||
}
|
||||
});
|
Reference in New Issue
Block a user