mirror of
https://github.com/flarum/framework.git
synced 2025-05-25 08:09:57 +08:00
Allow ActionButtons to be disabled
This commit is contained in:
@ -12,6 +12,12 @@ export default class ActionButton extends Component {
|
||||
var label = attrs.label;
|
||||
delete attrs.label;
|
||||
|
||||
if (attrs.disabled) {
|
||||
attrs.className = (attrs.className || '')+' disabled';
|
||||
delete attrs.onclick;
|
||||
delete attrs.disabled;
|
||||
}
|
||||
|
||||
attrs.href = attrs.href || 'javascript:;';
|
||||
return m('a'+(iconName ? '.has-icon' : ''), attrs, [
|
||||
iconName ? icon(iconName+' icon') : '',
|
||||
|
Reference in New Issue
Block a user