mirror of
https://github.com/flarum/framework.git
synced 2025-01-20 02:52:44 +08:00
Properly disable buttons
This commit is contained in:
parent
97334bea12
commit
ff6f2ebf82
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user