mirror of
https://github.com/flarum/framework.git
synced 2025-05-22 14:49:57 +08:00
Properly disable buttons
This commit is contained in:
@ -28,8 +28,7 @@ export default class Button extends Component {
|
||||
const iconName = extract(attrs, 'icon');
|
||||
if (iconName) attrs.className += ' hasIcon';
|
||||
|
||||
const disabled = extract(attrs, 'disabled');
|
||||
if (disabled) {
|
||||
if (attrs.disabled) {
|
||||
attrs.className += ' disabled';
|
||||
delete attrs.onclick;
|
||||
}
|
||||
|
Reference in New Issue
Block a user